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
Implicit HEAD support #243
Comments
you should use
|
It's the same problem with
Of course Node.js EDIT: I realize you probably meant doesn't do anything in the context of tinyhttp 👍 |
looks like However a |
@sonnyp hmm probably I need to add a check for |
I need to think how to edit |
I'm not entirely sure if it's a bug or a feature request.
Describe the bug
GET
routes do not have implicit support forHEAD
requests.Most (all?) http frameworks out there have implicit
HEAD
requests forGET
routes, they will simply ignore the response body.Also,
app.head
is not documented which makes it difficult to workaround.My opinion is that if a
GET
route doesn't have an associatedHEAD
route, support should be implicit.To Reproduce
curl -v -X HEAD http://localhost:3000/ping # -> 404 not found
Expected behavior
curl -v -X HEAD http://localhost:3000/ping # -> 204
Versions
node
: 14@tinyhttp/app
: 1.2.20The text was updated successfully, but these errors were encountered: