Merge "Remove non-functional handling of curl_error()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 4 Apr 2013 00:08:20 +0000 (00:08 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 4 Apr 2013 00:08:20 +0000 (00:08 +0000)
includes/HttpFunctions.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 4730a97..285cdac 100644 (file)
@@ -696,11 +696,6 @@ class MWHttpRequest {
 class CurlHttpRequest extends MWHttpRequest {
        const SUPPORTS_FILE_POSTS = true;
 
-       static $curlMessageMap = array(
-               6 => 'http-host-unreachable',
-               28 => 'http-timed-out'
-       );
-
        protected $curlOptions = array();
        protected $headerText = "";
 
@@ -780,13 +775,7 @@ class CurlHttpRequest extends MWHttpRequest {
                }
 
                if ( false === curl_exec( $curlHandle ) ) {
-                       $code = curl_error( $curlHandle );
-
-                       if ( isset( self::$curlMessageMap[$code] ) ) {
-                               $this->status->fatal( self::$curlMessageMap[$code] );
-                       } else {
-                               $this->status->fatal( 'http-curl-error', curl_error( $curlHandle ) );
-                       }
+                       $this->status->fatal( 'http-curl-error', curl_error( $curlHandle ) );
                } else {
                        $this->headerList = explode( "\r\n", $this->headerText );
                }
index 44b6cc9..8365dcb 100644 (file)
@@ -2397,7 +2397,6 @@ For optimal security, img_auth.php is disabled.',
 'http-read-error'       => 'HTTP read error.',
 'http-timed-out'        => 'HTTP request timed out.',
 'http-curl-error'       => 'Error fetching URL: $1',
-'http-host-unreachable' => 'Could not reach URL.',
 'http-bad-status'       => 'There was a problem during the HTTP request: $1 $2',
 
 # Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
index 9c883bf..8361b1b 100644 (file)
@@ -1480,7 +1480,6 @@ $wgMessageStructure = array(
                'http-read-error',
                'http-timed-out',
                'http-curl-error',
-               'http-host-unreachable',
                'http-bad-status',
        ),