ZF-4259: zend http client with proxy
Description
not working when rediretion occurs on server. (will add more info later). same address works when Fireox or Explorer is used with proxy
i made it works by changing 'write' method in Proxy.php:
if($this->negotiated){
$request = "{$method} {$uri->getPath()} HTTP/{$http_ver}\r\n";
}
else{
$request = "{$method} {$uri->__toString()} HTTP/{$http_ver}\r\n";
}
tcpdump:
CONNECT h1.host.com:443 HTTP/1.1 Host: 10.10.0.1
HTTP/1.0 200 Connection established
CONNECT h5.host.comhttps:443 HTTP/1.1 Host: 10.10.0.1
Comments
Posted by Shahar Evron (shahar) on 2008-10-21T15:03:43.000+0000
Hi -
Can you provide a more clear scenario?
I see you have HTTPS - does it also happen when you use regular HTTP proxy and not HTTPS ?
Where does the redirection happen? On the proxy server or on the remote server? What is the redirection code?
Thanks.
Posted by John Hopper (core.cure@gmail.com) on 2008-12-09T03:29:34.000+0000
sorry for the delay.
code + tcp dump follows:
CONNECT www.sf.net:443 HTTP/1.1. Host: 10.3.0.24. User-agent:
HTTP/1.0 200 Connection established.
CONNECT sourceforge.nethttps:443 HTTP/1.1. Host: 10.3.0.24. User-agent:
Posted by John Hopper (core.cure@gmail.com) on 2008-12-09T03:39:29.000+0000
redirection for http works fine. tested using proxy and the same host (http://sf.net )
Posted by Shahar Evron (shahar) on 2009-07-23T16:15:01.000+0000
Sorry for delaying with this - I almost used your patch to fix this. Please test with trunk after CS-17014. BTW this looks like some odd behavior of the sf.net servers because plain Apache works fine (I've been testing this for some time now).
Actually the SF.net servers send a pretty malformed redirection header (this is a dump of the response from sf.net):
As you can see something is buggy either in their code, or with their servers.. But since you say this doesn't happen with Firefox, I assumed this is something we can probably do better :)
Thanks for reporting!
Posted by Shahar Evron (shahar) on 2009-07-24T06:44:31.000+0000
This is indeed the difference, and this problem was fixed in SVN trunk. You can test with the latest SVN checkout or wait for the next release which will probably include this fix.
Thanks!
Shahar.
Posted by Satoru Yoshida (satoruyoshida) on 2009-11-17T22:51:11.000+0000
I set fix version. I find this at SVN r17118 in 1.9 branch.