From 3abb558ae8ad8ace504730db9c4718967a152b6f Mon Sep 17 00:00:00 2001 From: dd32 Date: Fri, 6 Jan 2012 12:53:44 +0000 Subject: [PATCH] Support custom HTTP Methods in WP_Http_Curl. Brings it in line with the other HTTP transports of respecting the requested method. Props zx2c4. Fixes #18589 git-svn-id: http://svn.automattic.com/wordpress/trunk@19696 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-http.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index beb91b445..e044e9d8a 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -1052,6 +1052,9 @@ class WP_Http_Curl { curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'PUT' ); curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] ); break; + default: + curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, $r['method'] ); + break; } if ( true === $r['blocking'] )