ZF-6976: Zend_Controller_Router_Route_Chain doesn't reset pathInfo in request
Let's suppose we're trying to match the following URL: /part1/part2/part3a And we have the following chains: part1->part2->part3a part1->part2->part3b
Last chain tries to match our URL and fails on the last part. Then first chain tries to match... but not the whole URL, because $request->getPathInfo() returns only part3a now! The solution is to call $request->setPathInfo($path) before returning false from inside the foreach() that iterates the routes, not only after finishing the foreach().
P.S.: I tried to avoid patching the ZF source by extending Zend_Controller_Router_Route_Chain with my custom class, but Zend_Controller_Router_Route_Abstract cannot be tuned to use my class in chain() method - it's hardcoded there.