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

Route trailing slash on mounted sub-routers #281

Merged
merged 1 commit into from Dec 22, 2017
Merged

Route trailing slash on mounted sub-routers #281

merged 1 commit into from Dec 22, 2017

Conversation

pkieltyka
Copy link
Member

@pkieltyka pkieltyka commented Nov 25, 2017

This PR addresses issue #260

I'm not convinced yet this is the correct behaviour, but it is convenient.

Waiting to hear feedback from the community before we merge it.

if _, resp := testRequest(t, ts, "GET", "/accounts/admin", nil); resp != "accounts index" {
t.Fatalf(resp)
}
if _, resp := testRequest(t, ts, "GET", "/accounts/admin/", nil); resp != "accounts index" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think GET /accounts/admin should work for sure, being handled by GET / in the subrouter.

Do we need to support /accounts/admin/ too? I think it doesn't really hurt, and makes sense ... since "" and "/" from the sub-router perspective should be the same.

@pkieltyka pkieltyka merged commit 91a3777 into master Dec 22, 2017
@pkieltyka pkieltyka deleted the fix-260 branch August 26, 2018 20:06
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

Successfully merging this pull request may close these issues.

None yet

2 participants