symfony-cmf / Routing

Routing component building on the Symfony Routing component
Other
288 stars 69 forks source link

ChainRouter does not handle URLs starting with two slashes properly #166

Closed sustmi closed 8 years ago

sustmi commented 8 years ago

This issue follows rejected pull requests: https://github.com/symfony-cmf/Routing/pull/147 and https://github.com/symfony-cmf/Routing/pull/152 and is still not fixed even after merging: https://github.com/symfony-cmf/Routing/pull/163 (sorry for not commenting earlier).

If you pass //test as an $url parameter into ChainRouter::match() method and you have RequestMatcherInterface in the chain, it tries to match it as pathinfo / with host test instead of matching as pathinfo //test.

See this failing test: https://github.com/symfony-cmf/Routing/compare/master...sustmi:test-for-matching-double-slash?expand=1

dbu commented 8 years ago

sorry, i was impatient to get this done. you are right, my "fix" did not fix your case. i now created #167 which i do hope will really fix it. can you have a look please?

sustmi commented 8 years ago

Yes. I can confirm that this fixes my use case.