ZF-2782: Zend_Controller_Request_Http setPathInfo breaks with %20 in url

Issue Type: Bug Created: 2008-03-03T04:35:03.000+0000 Last Updated: 2008-03-21T16:25:28.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: Jeremy Coates (cocomp) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Controller

Related issues: - ZF-2052



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

<pre class="highlight">
            if ((null !== $baseUrl)
                && (false === ($pathInfo = substr($requestUri, strlen($baseUrl)))))


<pre class="highlight">
            if ((null !== $baseUrl)
                && (false === ($pathInfo = substr($requestUri, strlen(urldecode($baseUrl))))))


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

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.