Fix odd edge case for POST Http::request()'s. I incidentally found this while working...
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 8 Jan 2009 06:56:11 +0000 (06:56 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 8 Jan 2009 06:56:11 +0000 (06:56 +0000)
includes/HttpFunctions.php

index 2458069..269d45f 100644 (file)
@@ -56,8 +56,10 @@ class Http {
 
                        curl_setopt( $c, CURLOPT_TIMEOUT, $timeout );
                        curl_setopt( $c, CURLOPT_USERAGENT, self :: userAgent() );
-                       if ( $method == 'POST' )
+                       if ( $method == 'POST' ) {
                                curl_setopt( $c, CURLOPT_POST, true );
+                               curl_setopt( $c, CURLOPT_POSTFIELDS, '' );
+                       }
                        else
                                curl_setopt( $c, CURLOPT_CUSTOMREQUEST, $method );