Closed hjr3 closed 7 years ago
@yanns I think we are pretty close here.
Should chunked encoding have a higher priority as the content length header?
Take a look here: http://httpwg.org/specs/rfc7230.html#message.body.length
Also, note that this implementation ignores duplicate content-length. And it's common attack vector for request smuggling.
@tailhook thx, very good doc.
If a message is received with both a Transfer-Encoding and a Content-Length header field, the Transfer-Encoding overrides the Content-Length.
In general we have some work to do to be conform... 😉
Thank you for the note @tailhook. We are definitely not conforming to the spec. Much of the work has been trying to get parsing working within the tokio framework.
I created https://github.com/hjr3/alacrity/issues/44 and https://github.com/hjr3/alacrity/issues/45 to track these two issues.
TODO:
UntilClose
tests