From d37c4b0ebca5fcb8b897769f5ccb39d70b546a0f Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 18 Nov 2010 03:34:28 +0000 Subject: [PATCH] WP_Http_ExtHTTP variable fix. Don't pass an empty array to http_request, props mdawaffe, fixes #13730. git-svn-id: http://svn.automattic.com/wordpress/trunk@16450 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-http.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 70feea846..9809c480e 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -280,6 +280,7 @@ class WP_Http { $r['headers']['Accept-Encoding'] = WP_Http_Encoding::accept_encoding(); if ( empty($r['body']) ) { + $r['body'] = null; // Some servers fail when sending content without the content-length header being set. // Also, to fix another bug, we only send when doing POST and PUT and the content-length // header isn't already set.