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

Request #13150 Add support for following HTTP 302 redirects
Submitted: 2008-02-19 20:03 UTC
From: jldupont Assigned: dufuz
Status: Closed Package: PEAR
PHP Version: Irrelevant OS: irrelevant
Roadmaps: 1.8.0RC1    
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 : 36 + 23 = ?

 [2008-02-19 20:03 UTC] jldupont (Jean-Lou Dupont)
Description: ------------ The installer does not support HTTP 302 (redirect) response. This shortcoming does not permit PEAR channels to be accessible through DNS redirect services such as EasyDns.


 [2008-02-19 20:12 UTC] jldupont (Jean-Lou Dupont)
Q: Why is this a good feature to have? A: Because it makes building PEAR channels cheap: one just has to use an SVN accessible web space (e.g. GoogleCode) to build a channel (i.e. no need for PHP support) + buy a DNS service (e.g. EasyDNS).
 [2008-07-13 00:55 UTC] dufuz (Helgi Þormar Þorbjörnsson)
And this doesn't work for you at the moment ? From what I can remember we did fix up PEAR installer for 1.5.0 to handle this exactly because one of our developers had a 302 redirect, granted it was not a channel but rather a straight url to a tgz that caused a 302. If you could show me a channel where it does not work I'll gladly fix it up.
 [2008-07-13 11:57 UTC] jldupont (Jean-Lou Dupont)
I've looked at the 1.7.2 code (which I am running): there is no 302 support in REST.php and REST/11.php nor REST/10.php. In the main method of REST.php i.e. retrieveData, if the ''downloadHtpp'' gets a 302, it is considered that the remote fetch failed and the local cache is inspected. The ''follow'' flow for a 302 should be implemented around retrieveData method or downloadHttp method.
 [2008-07-13 15:37 UTC] dufuz (Helgi Þormar Þorbjörnsson)
I see, I know that PEAR_Downloader::downloadHttp does support it tho it seems you are right about the REST part not supporting it - I shall be looking deeper into the matter.
 [2008-07-13 19:59 UTC] dufuz (Helgi Þormar Þorbjörnsson)
do you have any alternate domain setup for the ZF channel you host on google, that do 302 ? I'd wish to use it for a little bit of testing to see if I got things working.
 [2008-07-14 13:26 UTC] jldupont (Jean-Lou Dupont)
 [2008-07-14 18:04 UTC] dufuz (Helgi Þormar Þorbjörnsson)
I got the channel-discover working, it was PEAR_Downloader::downloadHttp that handled the redirects, it already seemed to work just fine - must have been some tweaking I did for this release that made the difference. Installing packages also works but that's not weird since your channel.xml still uses the googlecode address - Haven't yet tried to alter the channel file or such, I can put up a test tgz of PEAR you can install and try things out for your self. Would you be up for that ?
 [2008-07-14 18:11 UTC] jldupont (Jean-Lou Dupont)
I am up for it !
 [2008-07-14 18:37 UTC] dufuz (Helgi Þormar Þorbjörnsson)
Thanks, run pear upgrade it's alpha as you can see so you might have to change your preferred state or do upgrade -f :-) Come by on #pear on IRC EFNet, I'm there if you want more interactive chat to debug any issues.
 [2009-02-08 04:55 UTC] dufuz (Helgi Þormar Þorbjörnsson)
I just tried discovering with latest CVS and it worked fine, I did pear list-channels and saw it listed which is normal since you list that in the channel.xml file and when I did pear install zend/Zend it behaved correctly but presumably only because is listed as the channel. What I am curious about is this - Do you want to make it work so the channel.xml contains the or to use googlecode still ? I'd like to get this fully working and to your satisfaction before I release PEAR 1.8
 [2009-02-10 03:02 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Roadmap Versions: 1.8.0alpha1 +Roadmap Versions: 1.8.0alpha1, 1.8.0alpha2
Move to alpha2
 [2009-02-17 02:46 UTC] dufuz (Helgi Þormar Þorbjörnsson)
Any possibility you could chime in on this issue soon ? I might have to bump this to 1.9 if I can not confirm it.
 [2009-02-17 04:22 UTC] jldupont (Jean-Lou Dupont)
IMO, make it point to One goal of this feature is to be able to move a channel around without having people scrambling to locate it i.e. have a fixed anchor.
 [2009-03-03 05:35 UTC] dufuz (Helgi Þormar Þorbjörnsson)
The problem with that is channel.xml defines the googlecode address and you are suggesting we basically overwrite - From where I stand that sounds fairly dangerous security wise. Any reason why the channel.xml couldn't be updated with the proper address, ?
 [2009-03-08 05:40 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Roadmap Versions: 1.8.0alpha1, 1.8.0alpha2 +Roadmap Versions: 1.8.0alpha2
There is still work to be done it seems - moving to alpha2
 [2009-03-27 03:11 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Status: Assigned +Status: Closed
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. I believe this feature is now fully implemented, if anything is missing, please open up a bug report for the missing / wrong items! :-) I also added support so you can serve up the xml files as text/plain and the installer will still detect they are xml, thus making it even easier to deploy a channel (default behaviour in googlecode, no need for svn:mime-type). My test channel is - used your channel to test things out, thanks a lot for making it available! Very helpful. As you can see I even used in the baseurl, so googlecode is completely hidden away from people unless they visit the URL in their browser of course :-)