Skip to content

Commit

Permalink
Applied patch from bug #5913 (Proxy-Authorization header not added in…
Browse files Browse the repository at this point in the history
… constructor)

git-svn-id: http://svn.php.net/repository/pear/packages/HTTP_Request/trunk@208028 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
sad-spirit committed Feb 26, 2006
1 parent abda9a6 commit c8983e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Request.php
Expand Up @@ -278,6 +278,11 @@ function HTTP_Request($url = '', $params = array())
$this->addHeader('Authorization', 'Basic ' . base64_encode($this->_user . ':' . $this->_pass));
}

// Proxy authentication (see bug #5913)
if (!empty($this->_proxy_user)) {
$this->addHeader('Proxy-Authorization', 'Basic ' . base64_encode($this->_proxy_user . ':' . $this->_proxy_pass));
}

// Use gzip encoding if possible
// Avoid gzip encoding if using multibyte functions (see #1781)
if (HTTP_REQUEST_HTTP_VER_1_1 == $this->_http && extension_loaded('zlib') &&
Expand Down

0 comments on commit c8983e8

Please sign in to comment.