Skip to main content

Module http_date

Module http_date 

Source
Expand description

HTTP Date and Retry-After date readers (RFC 9110 §5.6.7).

Calendar arithmetic is jiff’s strptime; nothing here reads a clock.

Enums§

HttpDateError
Why an HTTP date was rejected.

Functions§

parse_http_date
Parse an HTTP-date (RFC 9110 §5.6.7) to Unix microseconds: the preferred IMF-fixdate and the two obsolete forms a recipient must still accept, the RFC 850 form (two-digit years follow jiff’s POSIX window: 69-99 are 19xx, 00-68 are 20xx, so no clock is needed) and the asctime form (always UTC). Resolution is whole seconds. Used for the Date and Retry-After headers.