-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix(server): Removed check for GET/HEAD request when parsing body #699
Conversation
Thanks for contributing! Unfortunately, I'm here to tell you there were the following style issues with your Pull Request:
Guidelines are available at https://github.com/hyperium/hyper/blob/master/CONTRIBUTING.md This message was auto-generated by https://gitcop.com |
@@ -9,7 +9,7 @@ use std::time::Duration; | |||
use buffer::BufReader; | |||
use net::NetworkStream; | |||
use version::{HttpVersion}; | |||
use method::Method::{self, Get, Head}; | |||
use method::Method::{self}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this last '::{self}' part can be removed now.
Hmm in this diff it seems that this use statement can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed + squashed into original commit. Thanks!
I like this PR as we should do things right. |
"); | ||
|
||
// FIXME: Use Type ascription | ||
let mock: &mut NetworkStream = &mut mock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should be able to write &mut mock as &mut NetworkStream
here (which you could also just inline into the following line).
Giving the spec another close read, it seems that both the existing and proposed behaviors are legal, since the spec doesn't tie any defined semantics to GET or HEAD requests with bodies. Since reading the body is more flexible and I've seen GET requests with bodies in the wild, I think we should do this. |
fix(server): Removed check for GET/HEAD request when parsing body
Indeed, it seems this is better behavior. Thanks for the patch! |
Fixes #698