}
}
- /**
- * Set the referrer header
- */
- public function setReferer( $url ) {
- $this->setHeader( 'Referer', $url );
- }
-
/**
* Set the user agent
* @param $UA string
* @return Status
*/
public function execute() {
- global $wgTitle;
-
wfProfileIn( __METHOD__ );
$this->content = "";
$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 ) {
$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;