Merge "Update OOjs UI to v0.1.0-pre (46ccd5b3a7)"
[lhc/web/wiklou.git] / includes / HttpFunctions.php
index 84d0437..274d4a7 100644 (file)
@@ -350,13 +350,6 @@ class MWHttpRequest {
                }
        }
 
-       /**
-        * Set the referrer header
-        */
-       public function setReferer( $url ) {
-               $this->setHeader( 'Referer', $url );
-       }
-
        /**
         * Set the user agent
         * @param $UA string
@@ -441,8 +434,6 @@ class MWHttpRequest {
         * @return Status
         */
        public function execute() {
-               global $wgTitle;
-
                wfProfileIn( __METHOD__ );
 
                $this->content = "";
@@ -451,10 +442,6 @@ class MWHttpRequest {
                        $this->headersOnly = true;
                }
 
-               if ( is_object( $wgTitle ) && !isset( $this->reqHeaders['Referer'] ) ) {
-                       $this->setReferer( wfExpandUrl( $wgTitle->getFullURL(), PROTO_CURRENT ) );
-               }
-
                $this->proxySetup(); // set up any proxy as needed
 
                if ( !$this->callback ) {
@@ -751,10 +738,6 @@ class CurlHttpRequest extends MWHttpRequest {
                $this->curlOptions[CURLOPT_MAXREDIRS] = $this->maxRedirects;
                $this->curlOptions[CURLOPT_ENCODING] = ""; # Enable compression
 
-               /* not sure these two are actually necessary */
-               if ( isset( $this->reqHeaders['Referer'] ) ) {
-                       $this->curlOptions[CURLOPT_REFERER] = $this->reqHeaders['Referer'];
-               }
                $this->curlOptions[CURLOPT_USERAGENT] = $this->reqHeaders['User-Agent'];
 
                $this->curlOptions[CURLOPT_SSL_VERIFYHOST] = $this->sslVerifyHost ? 2 : 0;