Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying multiple slashes in URL "after domain" and "before the locale" should redirect, but instead, it ignores the slashes and loads the route. #546

Open
bs-thomas opened this issue Apr 7, 2018 · 2 comments

Comments

@bs-thomas
Copy link
Contributor

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.

bs-thomas added a commit to bs-thomas/laravel-localization that referenced this issue Apr 7, 2018
…hen there are multiple consecutive slashes before locale.
@bs-thomas
Copy link
Contributor Author

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 pushed a commit that referenced this issue Apr 25, 2018
…re are multiple consecutive slashes before locale. (#547)
@bs-thomas
Copy link
Contributor Author

@mcamara Nice, thanks for the merge! Btw, do we not need any unit tests? Notice I haven't included them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant