seanmonstar / httparse

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

Clarify behavior of `parse_headers()` when passed a zero-length byte buf #33

Closed abonander closed 2 years ago

abonander commented 7 years ago

Currently, it appears to return Status::Partial even though a zero-sized buf generally means the end of a stream. It should probably return Status::Complete((0, &[])) instead.

nox commented 2 years ago

This should probably be closed. A zero-sized buf does not terminate with \r\n so no, the parse was not complete.