Re: Problem with pyrus behind http proxy

From: Date: Wed, 07 Dec 2011 06:28:28 +0000
Subject: Re: Problem with pyrus behind http proxy
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-31329@lists.php.net to get a copy of this message
Hi, I've been debugging this some more and pyrus gives a mal formed command to the proxy. This is what pyrus sends after connecting to the proxy server: GET /rest/p/pear2_net_transmitter/info.xml HTTP/1.0 Host: pear2.php.net User-Agent: PEAR2_Pyrus/2.0.0a3/PHP/5.3.2 Accept: Our squid3 proxy doesn't accept that. It wants to have it like this: GET http://pear2.php.net/rest/p/pear2_net_transmitter/info.xml HTTP/1.0 Host: pear2.php.net User-Agent: PEAR2_Pyrus/2.0.0a3/PHP/5.3.2 Accept: To me this looks like a bug in pyrus. MvH. Olof > > Hi, > >>> > ./phpfarm/inst/php-5.3.2/bin/php ./phpfarm/inst/php-5.3.2/pyrus.phar >>> > set >>> http_proxy "http://myworkingproxy:myport" >> Did you try removing the "http://"? > > Yes, should have mentioned that I did. If I do then I get an error from > the proxy that it's an invalid url but at least pyrus tries to contact the > proxy. If I specify http_proxy with http:// then it never even > tries to > contact the proxy server. > > This is what I get when removing http:// > >> ./phpfarm/inst/php-5.3.2/bin/php ./phpfarm/inst/php-5.3.2/pyrus.phar > install pear/HTTP_Download-1.1.4 > Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D > Using PEAR installation found at ppp > PEAR2\Pyrus\Channel\Exception: package HTTP_Download does not exist > PEAR2\Pyrus\HTTPException: File > http://pear.php.net/rest/p/http_download/info.xml not valid > (received: > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" > "http://www.w3.org/TR/html4/strict.dtd"> > <html><head> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> > <title>ERROR: The requested URL could not be retrieved</title> > <style type="text/css"><!-- > /* > Stylesheet for Squid Error pages > Adapted from design by Free CSS Templates > http://www.freecsstemplates.org > Released for free under a Creative Commons Attribution 2.5 License > */ > > [snip] > > <hr> > <div id="footer"> > <p>Generated Tue, 29 Nov 2011 13:10:38 GMT by httpproxy.mydomainname > (squid/3.1.15)</p> > <!-- ERR_INVALID_URL --> > </div> > </body></html> > ) > > I get this in the squid3 access log: > > 1322572701.789 0 <my client ip> NONE/400 3634 GET > /rest/p/http_download/info.xml - NONE/- text/html > > So pyrus seems to skip the host part of the url. Am I doing something > wrong or should I file this as a bug in pyrus? > > Kind Regards, > > Olof > > > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.pear.general (#31329) next »