* php's HTTP extension.
*/
class MWHttpRequest {
+ const SUPPORTS_FILE_POSTS = false;
+
protected $content;
protected $timeout = 'default';
protected $headersOnly = null;
$this->headersOnly = true;
}
- if ( is_array( $this->postData ) ) {
- $this->postData = wfArrayToCGI( $this->postData );
- }
-
if ( is_object( $wgTitle ) && !isset( $this->reqHeaders['Referer'] ) ) {
$this->setReferer( $wgTitle->getFullURL() );
}
* MWHttpRequest implemented using internal curl compiled into PHP
*/
class CurlHttpRequest extends MWHttpRequest {
+ const SUPPORTS_FILE_POSTS = true;
+
static $curlMessageMap = array(
6 => 'http-host-unreachable',
28 => 'http-timed-out'
public function execute() {
parent::execute();
+ if ( is_array( $this->postData ) ) {
+ $this->postData = wfArrayToCGI( $this->postData );
+ }
+
// At least on Centos 4.8 with PHP 5.1.6, using max_redirects to follow redirects
// causes a segfault
$manuallyRedirect = version_compare( phpversion(), '5.1.7', '<' );