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

Bug #1040 HTTP::redirect() HTTPS on port 80 or HTTP on port 443 would loose port number
Submitted: 2004-03-19 17:47 UTC
From: jausions Assigned: mike
Status: Closed Package: HTTP
PHP Version: Irrelevant OS: All
Roadmaps: (Not assigned)    
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 : 6 + 9 = ?

 
 [2004-03-19 17:47 UTC] jausions
Description: ------------ If you have a secure server (HTTPS) running on port 80 or a regular HTTP running on port 443, the HTTP::redirect() would loose the port number for relative URLs. A patch has been submitted to the pear-dev@lists.php.net list for this bug along with other fixes and improvements for the PEAR::HTTP package. Reproduce code: --------------- <?php /** * Call script from a regular HTTP server (assuming * "http://localhost/pear/test.php") **/ require_once('HTTP.php'); // Simulate HTTP server runs on port 443 (if you haven't // changed web server configuration $_SERVER['SERVER_PORT'] = 443; HTTP::header('some/relative/URL'); // Same goes for port 80 for a secure server... port number // is lost... ?> Expected result: ---------------- Header: http://localhost:443/pear/some/relative/URL Actual result: -------------- Header: http://localhost/pear/some/relative/URL

Comments

 [2004-03-30 21:26 UTC] jausions
 [2004-06-09 18:05 UTC] mike
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.
 [2006-08-19 09:20 UTC] m_moravveg at yahoo dot com (m_mor)
m_mor