-
Notifications
You must be signed in to change notification settings - Fork 327
Strip the result body when creating default HEAD responses #45
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
Comments
@aturon did a little diggin into this, not sure if I am reading this right either, but it seems like hyper handles this for us. In the current code on master here are some example responses from curl The get request: url --get --url http://127.0.0.1:8000/add_two/2 --header 'content-type: application/json' -v Returns
and the head request: curl --head --url http://127.0.0.1:8000/add_two/2 --header 'content-type: application/json' -v returns
Perhaps I am missing something though. Thoughts? |
That's very interesting. I haven't been able to track down where this is happening in Hyper... |
@seanmonstar maybe you can provide a quick answer: does Hyper have built-in treatment for |
hyper will try to prevent illegal HTTP semantics, like sending a body in response to It may still be useful to recognize a |
@aturon if this is the case, should we just write a test case to ensure that |
@tzilist Yep, that seems reasonable for now! I'd also suggest adding a comment to make clear that's what we're doing. |
I attempted to write a test for this given the mock service provided through |
Has this issue been fully resolved? |
If you don't specify a
HEAD
behavior but you do provideGET
, Tide will automatically use theGET
behavior. But it retains the body, which should be stripped.The text was updated successfully, but these errors were encountered: