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

Bug #3492 Redirect on Location doesn't work correctly with GET args
Submitted: 2005-02-16 16:05 UTC
From: aswl at calluk dot com Assigned:
Status: Wont fix Package: HTTP_Request
PHP Version: Irrelevant OS: Irrelevant
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 : 37 - 31 = ?

 
 [2005-02-16 16:05 UTC] aswl at calluk dot com
Description: ------------ When you issue a GET request with a querystring and it gets redirected to another location it appends the query string again even though it gets returned in the location header. GET /test.aspx?xmldoc=test Response Code: 302 [Server] => Microsoft-IIS/5.0 [X-Powered-By] => ASP.NET [X-AspNet-Version] => 1.1.4322 [Location] => /(zdz0ty45blgf2oafdwkwlm55)/test.aspx?xmldoc=test GET /(zdz0ty45blgf2oafdwkwlm55)/test.aspx?xmldoc=test&xmldoc=test Response Code: 500 Reproduce code: --------------- The following will reset the query string for an Absolute Path Redirect, may also affect other forms of redirect. --- Request.php.orig 2005-02-16 15:27:10.679649521 +0000 +++ Request.php 2005-02-16 15:30:30.516653523 +0000 @@ -623,6 +623,7 @@ // Absolute path } elseif ($redirect{0} == '/') { $this->_url->path = $redirect; + $this->_url->querystring = array(); // Relative path } elseif (substr($redirect, 0, 3) == '../' OR substr($redirect, 0, 2) == './') { Expected result: ---------------- Response Code: 200 With the response body containing the XML result Actual result: -------------- The URL is set to the redirect Location header with the original querystring appended.

Comments

 [2005-02-23 16:20 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!
 [2005-02-23 16:26 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!