packages

http::h1

HTTP/1.1 message syntax (RFC 9112): strict head parsing, body framing, chunked coding, serialization.

Parsing is strict where leniency enables request smuggling or response splitting: lines end in CRLF only (a bare CR or LF is an error), no obs-fold, no whitespace before a field's colon, a single valid Content-Length, Transfer-Encoding only as exactly chunked and never together with Content-Length or in HTTP/1.0.

Structs

LimitsSource

pub struct Limits

Size limits of a message head.

  • pub max_head: usize = 65536§

    Source

    Bytes of the request / status line plus fields.

  • pub max_fields: usize = 100§

    Source
  • pub max_target: usize = 8192§

    Source

    Bytes of the request target.

Functions

http_dateSource

pub fn http_date(secs: i64) -> str

Sun, 06 Nov 1994 08:49:37 GMT (IMF-fixdate) for Unix time secs.