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

not found and method not allowed #7

Open
mybigman opened this issue Jun 12, 2024 · 3 comments
Open

not found and method not allowed #7

mybigman opened this issue Jun 12, 2024 · 3 comments

Comments

@mybigman
Copy link

can you add the ability to set these?

@hossein1376
Copy link
Owner

Hey!
That is a feature I really liked to have as well. Unfortunately, these two are hard coded into the standard library.

Not Found:
https://github.com/golang/go/blob/master/src/net/http/server.go#L2250

Not Allowed:
https://github.com/golang/go/blob/master/src/net/http/server.go#L2625-L2627

Grape, being a wrapper around stdlib, has no ways to set them directly. I will try creating a PR to make these two dynamic. With any luck, we may have this feature in future Go releases. That's a long shot though.

@mybigman
Copy link
Author

@hossein1376
Copy link
Owner

I appreciate your suggestion, although all of these packages are implementing the routing themselves. Grape, on the other hand, relies on the standard library for the routing. Hence, some features depend on the flexibility of stdlib's APIs.

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