ZF-2782: Zend_Controller_Request_Http setPathInfo breaks with %20 in url
Description
Between 1.0.3 and 1.0.4/1.5RC1 the setRequestUri method (lines 328-258) in Zend_Controller_Request_Http has added a urldecode($requestUri) call (line 356) but not had this reflected in the setPathInfo method (lines 525-551) around the baseUrl when doing the substr (lin 540).
Example that breaks this: Any Url with %20 in it.
Fix - change (lines 539 - 541):
if ((null !== $baseUrl)
&& (false === ($pathInfo = substr($requestUri, strlen($baseUrl)))))
{
to:
if ((null !== $baseUrl)
&& (false === ($pathInfo = substr($requestUri, strlen(urldecode($baseUrl))))))
{
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-03-06T09:00:51.000+0000
This issue is related to ZF-2052, and I plan to revert the change for that issue as it appears to break more things than it fixes.
Posted by Matthew Weier O'Phinney (matthew) on 2008-03-06T09:38:59.000+0000
Scheduling for 1.5.0RC2
Posted by Matthew Weier O'Phinney (matthew) on 2008-03-06T10:57:51.000+0000
Fixed in trunk; will merge to release branch shortly.
Posted by Matthew Weier O'Phinney (matthew) on 2008-03-06T11:19:12.000+0000
Resolved with r8576