r25362 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25361‎ | r25362 | r25363 >
Date:14:53, 31 August 2007
Author:tstarling
Status:old
Tags:
Comment:
Don't return truncated output
Modified paths:
  • /trunk/phase3/includes/HttpFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HttpFunctions.php
@@ -20,6 +20,7 @@
2121 static function request( $method, $url, $timeout = 'default' ) {
2222 global $wgHTTPTimeout, $wgHTTPProxy, $wgVersion, $wgTitle;
2323
 24+ wfDebug( __METHOD__ . ": $method $url\n" );
2425 # Use curl if available
2526 if ( function_exists( 'curl_init' ) ) {
2627 $c = curl_init( $url );
@@ -57,6 +58,10 @@
5859 if ( curl_getinfo( $c, CURLINFO_HTTP_CODE ) != 200 ) {
5960 $text = false;
6061 }
 62+ # Don't return truncated output
 63+ if ( curl_errno( $c ) != CURLE_OK ) {
 64+ $text = false;
 65+ }
6166 curl_close( $c );
6267 } else {
6368 # Otherwise use file_get_contents...

Follow-up revisions

RevisionCommit summaryAuthorDate
r25372Merged revisions 25338-25371 via svnmerge from...david18:18, 31 August 2007

Status & tagging log