laravel-localization
laravel-localization copied to clipboard
Specifying multiple slashes in URL "after domain" and "before the locale" should redirect, but instead, it ignores the slashes and loads the route.
Actual Behavior (a) http://www.somedomain.com/en/some/path This loads the route "some/path/" (handled by Laravel)
(b) http://www.somedomain.com///en/some/path This ALSO loads the route "some/path/" (handled by Laravel)
Expected Behavior (a) http://www.somedomain.com/en/some/path This should load the route "/some/path/" (handled by Laravel)
(b) http://www.somedomain.com///en/some/path This should get redirected to http://www.somedomain.com/en//en/some/path, (handled by laravel-localization) and then load the route "//en/some/path" (handled by Laravel)
I am working on a fix, will send a Pull Request shortly.
Btw I also noticed that the tests do not include this case yet.
But I'm not quite sure how the unit test works. Tried looking, but couldnt quickly understand and underght schedule.
Would any kind person be able to add this test in? Thanks a bunch!!
@mcamara Nice, thanks for the merge! Btw, do we not need any unit tests? Notice I haven't included them.