-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Describe the bug
When the route is defined as @Post("/"), making a POST request to http://localhost:3000/post does not work (throws a 404 error). Only http://localhost:3000/post/ works.
To Reproduce
Steps to reproduce the behavior:
- Define a POST route with
@Post("/")in thePostController. - Start the server.
- Make a POST request to
http://localhost:3000/post(throws a 404 error). - Make a POST request to
http://localhost:3000/post/(works).
Expected behavior
The route should work for both http://localhost:3000/post and http://localhost:3000/post/ seamlessly.
Desktop (please complete the following information):
- OS: [e.g., Windows 11]
- Browser: [e.g., Postman]
- Version: [e.g., v10.14]
Additional context
This issue is caused by the route handling logic not normalizing paths without trailing slashes. A fix could involve ensuring that both cases are treated equivalently.
Metadata
Metadata
Assignees
Labels
No labels
