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

Bug #5759 Location header not handled correctly for non-http protocols
Submitted: 2005-10-23 20:06 UTC
From: pookey at php dot net Assigned: avb
Status: Closed Package: HTTP_Client
PHP Version: Irrelevant OS: Any
Roadmaps: (Not assigned)    

 [2005-10-23 20:06 UTC] pookey at php dot net
Description: ------------ Location header not handled correctly for non-http protocols. If a Location: for example is returned by an HTTP request to, then HTTP_Request assumes this is a relative redirect and will redirect to Problem occours at lines 620-650. I advise a conditional error just after if (preg_match('/^https?:\/\//i', $redirect)) { .. } elseif perhaps a regex matching [a-z]{3,5}:// ? perhaps an error saying 'redirect to unsupported protocol'


 [2005-11-05 16:36 UTC] avb
Redirect support is deprecated in HTTP_Request. Moving the report to HTTP_Client package which suffers from the same problem.
 [2006-06-02 20:12 UTC] avb (Alexey Borzov)
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. --- In case of non-HTTP redirect it just returns now (since that's not exactly a error, there is no point in raising one). The URL is available for further processing in current response.