-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
The framing of a HTTP request doesn't depend on the method [1], so any request with a non-zero Content-Length has a corresponding body. This does not change in the case of idempotent methods like GET; what is different is that for such methods it is incorrect for the server's response to depend on the content of this body.
At the moment GET and HEAD are incorrectly special cased in hyper [2] leading to problems if you send a GET request with a body (the unread body bleeds into the following request unless the connection is closed). In these cases the body data, if any, must be read from the network but could be discarded and not made avaliable through the request API.
[1] https://tools.ietf.org/html/rfc7230#section-3.3
[2] https://github.com/hyperium/hyper/blob/master/src/server/request.rs#L42