From 698b51118bc46de838f8020d5b51063267111097 Mon Sep 17 00:00:00 2001 From: Reedy Date: Mon, 21 May 2012 23:10:51 +0100 Subject: [PATCH] Revert "Treat truncated HTTP requests as errors." Caused bug 36950 among other issues This reverts commit ded6170bd2072971f72db794f3ab1625a8e13475 Change-Id: I26500896a09a9fe720dc31b3d48cdbb3cd6c8677 --- includes/HttpFunctions.php | 6 ------ languages/messages/MessagesEn.php | 1 - languages/messages/MessagesQqq.php | 1 - maintenance/language/messages.inc | 1 - 4 files changed, 9 deletions(-) diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index fbae861fc7..201a9e5a8d 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -778,12 +778,6 @@ class CurlHttpRequest extends MWHttpRequest { $this->parseHeader(); $this->setStatus(); - if ( isset( $this->respHeaders['content-length'] ) ) { - if ( strlen( $this->content ) < $this->getResponseHeader( 'content-length' ) ) { - $this->status->fatal( 'http-truncated-body' ); - } - } - return $this->status; } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 1145158ab7..146230ba99 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2354,7 +2354,6 @@ For optimal security, img_auth.php is disabled.', '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', -'http-truncated-body' => 'The request body was only partially received.', # Some likely curl errors. More could be added from 'upload-curl-error6' => 'Could not reach URL', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index fe32f9c1c3..a621bb1f15 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -2036,7 +2036,6 @@ Siebrand think this has to do with allowing MediaWiki to fetch remote URLs, and If \'scheme\' is difficult to translate, then you could use \'prefix\' instead.', 'http-bad-status' => '$1 is an HTTP error code (e.g. 404), $2 is the HTTP error message (e.g. File Not Found)', -'http-truncated-body' => 'This is a standard HTTP error message. → Seems the connection closed prematurely. The HTTP response contained a content-length greater than the received body.', 'license' => 'This appears in the upload form for the license drop-down. The header in the file description page is now at {{msg-mw|License-header}}.', 'nolicense' => '{{Identical|None selected}}', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 9a63dd6660..27862c8344 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1452,7 +1452,6 @@ $wgMessageStructure = array( 'http-curl-error', 'http-host-unreachable', 'http-bad-status', - 'http-truncated-body', ), 'upload-curl-errors' => array( -- 2.20.1