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

Bug #8254 downloading doesn't work with 302 messages
Submitted: 2006-07-20 05:32 UTC
From: cweiske Assigned: cellog
Status: Closed Package: PEAR (version 1.4.10)
PHP Version: 5.1.4 OS: Linux
Roadmaps: (Not assigned)    
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:
Solve the problem : 48 + 28 = ?

 [2006-07-20 05:32 UTC] cweiske (Christian Weiske)
Description: ------------ Downloading packages doesn't always work: Try to "pear install" (the package from and pear will give you the error Could not download from "" Invalid or missing remote package file Package "" is not valid install failed When downloading with wget, I see that the file is redirected: Resolving Connecting to||:80... connected. HTTP request sent, awaiting response... 302 Found Location: [following] --07:27:25-- => `PHP_CodeSniffer-0.0.1.tgz' The PEAR downloader should be able handle this.


 [2006-09-02 10:14 UTC] bjori (Hannes Magnusson)
Technically there is no "Host" header in HTTP/1.0 but 99.9% webservers out there does however support it. Adding :portNumber in back of the host is pushing it to far. The following patch (against current cvs) fixes it:
 [2006-09-02 10:17 UTC] cweiske (Christian Weiske)
Hannes, I don't see where this helps with a 302 redirect?
 [2006-09-02 17:42 UTC] bjori (Hannes Magnusson)
Thats the point, you don't get the 302 redirect. PEAR Downloader works just fine with 302 redirects. In this case you are getting 404 error...
 [2006-09-05 15:49 UTC] cweiske (Christian Weiske)
Ok, now I understand. But is it allowed to include the port in the host header at all?
 [2006-09-05 16:19 UTC] bjori (Hannes Magnusson)
In HTTP/1.1 the Host header MUST be included. The port number is optional.
 [2006-09-18 16:36 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the 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. thanks guys - I love patches. :)