From f2edc4b2c6190dd23d76a819abf081b9247fc06f Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 15 Mar 2012 05:33:38 +0000 Subject: [PATCH] WP_HTTP: Send the body with custom method requests when using cURL. Fixes #18589 git-svn-id: https://develop.svn.wordpress.org/trunk@20183 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-http.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index e044e9d8a2..d4247fd9f3 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -1054,6 +1054,8 @@ class WP_Http_Curl { break; default: curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, $r['method'] ); + if ( ! empty( $r['body'] ) ) + curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] ); break; }