Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.4

Bug #5913 Proxy-Authentication header not added
Submitted: 2005-11-09 19:48 UTC Modified: 2006-06-13 01:53 UTC
From: eru at php dot net Assigned: avb
Status: Closed Package: HTTP_Request
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2005-11-09 19:48 UTC] eru at php dot net
Description: ------------ (HTTP_Request 1.3.0) When proxy-information is passed as parameters to the class-constructor, the Proxy-Authentication header is left out, whereas using the setProxy() function properly adds it. See patch below. Test script: --------------- --- Request.php.bak Tue Nov 08 14:54:26 2005 +++ Request.php Thu Nov 10 01:33:33 2005 @@ -278,6 +278,11 @@ $this->addHeader('Authorization', 'Basic ' . base64_encode($this->_user . ':' . $this->_pass)); } + // Proxy authentication + 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') &&

Comments

 [2005-11-09 20:02 UTC] eru at php dot net
One other thing: SOAP_WSDL is already working around this bug (lines 918-927) and I'm wondering why they didn't post a report at the time they encountered it. Anyway, you should give them a heads-up when applying the fix, otherwise the header gets added twice. Dunno about other classes.
 [2006-02-26 12:56 UTC] avb
Thanks, patch applied. There will be no problems with existing workarounds, the header will be overwritten.
 [2006-06-07 08:06 UTC] webmaster at east dot in dot ua (Bogdan)
found the same problem. previous comment says 'patch applied', but in HTTP_Request 1.3.0 stable there is no code to handle proxy-auth.... Did I miss something or the patch is _not_ applied?
 [2006-06-13 01:53 UTC] avb (Alexey Borzov)
Patch applied to CVS. Release was not done yet, obviously.