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)
commit7b8b26aa6493c53145b295e796b5e528c65cf0e2
treebe19544927fcb5303c75c9a53f847937296693ef
parenta9cd1c10f55833abb2a78ac8d3ba257fe8c325b6
Fix odd edge case for POST Http::request()'s. I incidentally found this while working with Special:Import. For some reason that I can't 100% nail down--works fine on Win32, fails on CentOS--cURL seems to want CURLOPT_POSTFIELDS set to at least an empty string, if not values. Using a workaround I found, we'll set it to an empty string if we're making a POST. Since we explicitly allow setting of arbitrary curlopts later, users can still override the empty string if they in fact want to set this. This fixes my Special:Import problem (and possibly similar issues) and has no regressions afaict. Credit to Phill Sparks @ milk-hub.net/blog/2008/08/26/curl_error_26#comments-77
includes/HttpFunctions.php