seanmonstar / httparse

A push parser for the HTTP 1.x protocol in Rust.
https://docs.rs/httparse
Apache License 2.0
585 stars 114 forks source link

skip empty lines before Request-Line #11

Closed bonifaido closed 9 years ago

bonifaido commented 9 years ago

According to the specification they might come. I have observed this when a hyper server started to give "request error = Version" messages.

seanmonstar commented 9 years ago

Thanks for the pull request! The specification also says newlines can be either CRLF or just LF, so I've adjusted it to allow both. I merged that into master here: https://github.com/seanmonstar/httparse/commit/5ad25593e76baf399622d77b2df66720fa76e33e