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

Path not found error : trailing slash url #34

Closed
alexmontecucco opened this issue Jan 24, 2017 · 1 comment
Closed

Path not found error : trailing slash url #34

alexmontecucco opened this issue Jan 24, 2017 · 1 comment

Comments

@alexmontecucco
Copy link

Problem statement

When I specify endpoints ending with a slash in my swagger file, at runtime when trying to reach the same endpoint I get a {"code":404,"message":"path /trailingslashpath/ was not found"} response.

It looks related to this: github.com/go-swagger/go-swagger/pull/292 but the problem does not come from the same code.

I don't know if this is an expected result or not.
The behavior is due to the DefaultRouter function. It calls the 'path.Join' function which removes any trailing slash except for the root path.
The result is that no handler seems to be registered.

@casualjim
Copy link
Member

fixed by 196f817

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

2 participants