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)    
Subscription  


 [2005-10-23 20:06 UTC] pookey at php dot net
Description: ------------ Location header not handled correctly for non-http protocols. If a Location: ftp://bar.com for example is returned by an HTTP request to http://foo.com, then HTTP_Request assumes this is a relative redirect and will redirect to http://foo.com/ftp://bar.com 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'

Comments

 [2005-11-05 16:36 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-06-02 20:12 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!