From e73a081be7a7dea10e41a8e004be645f950fb94a Mon Sep 17 00:00:00 2001 From: azaozz Date: Sat, 26 Sep 2009 22:52:42 +0000 Subject: [PATCH] Expose HTTP PUT when supported, props mdawaffe, fixes #10855 git-svn-id: http://svn.automattic.com/wordpress/trunk@11977 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/http.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wp-includes/http.php b/wp-includes/http.php index cb45212d2..3d623fe48 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -1121,6 +1121,9 @@ class WP_Http_ExtHTTP { case 'HEAD': $r['method'] = HTTP_METH_HEAD; break; + case 'PUT': + $r['method'] = HTTP_METH_PUT; + break; case 'GET': default: $r['method'] = HTTP_METH_GET; @@ -1306,6 +1309,10 @@ class WP_Http_Curl { curl_setopt( $handle, CURLOPT_POST, true ); curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] ); break; + case 'PUT': + curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'PUT' ); + curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] ); + break; } if ( true === $r['blocking'] )