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

Bug #13559 installing package fails via proxy to virtual-hosted server.
Submitted: 2008-04-02 05:49 UTC
From: hirose Assigned: hirose
Status: Closed Package: PEAR (version 1.7.1)
PHP Version: 5.2.5 OS:
Roadmaps: 1.7.2    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 31 + 12 = ?

 
 [2008-04-02 05:49 UTC] hirose (Yoshiharu Hirose)
Description: ------------ The request message by "pear install" contains "Host: proxy:8080" and the proxy server forward this Host header transparently to target server, but virtual-hosted server can not recognize requesting service. I think the "Host" header should be the target host (not proxy itself).

Comments

 [2008-04-03 03:33 UTC] hirose (Yoshiharu Hirose)
I tried to fix this. (I couldn't submit a patch..) --- REST.php.ORIG 2008-04-02 15:13:20.517375000 +0900 +++ REST.php 2008-04-02 15:13:55.626750000 +0900 @@ -305,11 +305,10 @@ } If (isset($proxy['host'])) { $request = "GET $url HTTP/1.1\r\n"; - $request .= 'Host: ' . $proxy['host'] . ":$port\r\n"; } else { $request = "GET $path HTTP/1.1\r\n"; - $request .= "Host: $host:$port\r\n"; } + $request .= "Host: $host:$port\r\n"; $ifmodifiedsince = ''; if (is_array($lastmodified)) {
 [2008-05-13 18:03 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.