Don't manually quote stuff
[lhc/web/wiklou.git] / includes / HttpFunctions.php
index fbae861..8453e62 100644 (file)
@@ -156,7 +156,7 @@ class Http {
         *
         * file:// should not be allowed here for security purpose (r67684)
         *
-        * @fixme this is wildly inaccurate and fails to actually check most stuff
+        * @todo FIXME this is wildly inaccurate and fails to actually check most stuff
         *
         * @param $uri Mixed: URI to check for validity
         * @return Boolean
@@ -212,7 +212,7 @@ class MWHttpRequest {
         * @param $url String: url to use. If protocol-relative, will be expanded to an http:// URL
         * @param $options Array: (optional) extra params to pass (see Http::request())
         */
-       function __construct( $url, $options = array() ) {
+       protected function __construct( $url, $options = array() ) {
                global $wgHTTPTimeout;
 
                $this->url = wfExpandUrl( $url, PROTO_HTTP );
@@ -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;
        }