-
Notifications
You must be signed in to change notification settings - Fork 76
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
oxidecomputer/dropshot#348 support for HEAD method #755
Conversation
This seems like a good step. How about a test? I still wonder if it'd be useful to be able to opt into Dropshot implementing this for you if you have a |
Can you point me at an existing test that I should modify to cover this case?
I think all of that is valuable, but obviously more work -- and I think even if we did do that, it would still be valuable to be able to escape and directly handle the request this way as well. |
It's a little cheesy but this file has a bunch of endpoints and some tests that exercise them, which is at least a basic check: dropshot/dropshot/tests/test_demo.rs Lines 811 to 821 in 35d4408
I'd add a HEAD one analogous to the DELETE one.
💯 |
I have added a test here. It's a bit more complex than the DELETE one, because I decided to verify that we are actually able to generate a zero-length response body with the appropriate non-zero Content-Length for a HEAD request, and that it all matches up with a GET request for the same URL in our mock server. |
Offline, we discussed that it's a little easy to misuse this in that one could try to return a |
No description provided.