postmanlabs/httpbin

404 Not Found for http://httpbin.org/anything/

Telamon-m opened this issue · 1 comments

The very useful endpoint http://httpbin.org/anything has an issue:
When you have a trailing slash, i. e. http://httpbin.org/anything/ it gives you a 404.
Instead it should serve the same as with http://httpbin.org/anything

The very useful endpoint http://httpbin.org/anything has an issue: When you have a trailing slash, i. e. http://httpbin.org/anything/ it gives you a 404. Instead it should serve the same as with http://httpbin.org/anything

Thats because the router is configured like the below.

@app.route("/anything", methods=["GET", "POST", "PUT", "DELETE", "PATCH", "TRACE"])
@app.route("/anything/path:anything", methods=["GET", "POST", "PUT", "DELETE", "PATCH", "TRACE"])

Issue is that it is expecting another parameter 'path' after '/' at the end. When it doesn't receive, its throwing an error 404: Not found.