Index: trunk/phase3/includes/HttpFunctions.php |
— | — | @@ -20,6 +20,7 @@ |
21 | 21 | static function request( $method, $url, $timeout = 'default' ) { |
22 | 22 | global $wgHTTPTimeout, $wgHTTPProxy, $wgVersion, $wgTitle; |
23 | 23 | |
| 24 | + wfDebug( __METHOD__ . ": $method $url\n" ); |
24 | 25 | # Use curl if available |
25 | 26 | if ( function_exists( 'curl_init' ) ) { |
26 | 27 | $c = curl_init( $url ); |
— | — | @@ -57,6 +58,10 @@ |
58 | 59 | if ( curl_getinfo( $c, CURLINFO_HTTP_CODE ) != 200 ) { |
59 | 60 | $text = false; |
60 | 61 | } |
| 62 | + # Don't return truncated output |
| 63 | + if ( curl_errno( $c ) != CURLE_OK ) { |
| 64 | + $text = false; |
| 65 | + } |
61 | 66 | curl_close( $c ); |
62 | 67 | } else { |
63 | 68 | # Otherwise use file_get_contents... |