Fix odd edge case for POST Http::request()'s. I incidentally found this while working...
[lhc/web/wiklou.git] / 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 );