From: Tim Starling Date: Fri, 31 Aug 2007 14:53:17 +0000 (+0000) Subject: Don't return truncated output X-Git-Tag: 1.31.0-rc.0~51578 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=697c6b32b4a25b0025c7e8f12f70a81b06574b2d;p=lhc%2Fweb%2Fwiklou.git Don't return truncated output --- diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index bff9b3e6dc..6ea3abd0d4 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -20,6 +20,7 @@ class Http { static function request( $method, $url, $timeout = 'default' ) { global $wgHTTPTimeout, $wgHTTPProxy, $wgVersion, $wgTitle; + wfDebug( __METHOD__ . ": $method $url\n" ); # Use curl if available if ( function_exists( 'curl_init' ) ) { $c = curl_init( $url ); @@ -57,6 +58,10 @@ class Http { if ( curl_getinfo( $c, CURLINFO_HTTP_CODE ) != 200 ) { $text = false; } + # Don't return truncated output + if ( curl_errno( $c ) != CURLE_OK ) { + $text = false; + } curl_close( $c ); } else { # Otherwise use file_get_contents...