BSD-3-Clause licensed and maintained by Kazu Yamamoto
This version can be pinned in stack with:http-date-0.0.13@sha256:5aece4efb247303811614119b44a650e0b5a2ab798521a59d458ec85c8d63e9e,1739

Module documentation for 0.0.13

Fast parser and formatter for HTTP Date

Changes

ChangeLog for http-date

0.0.13

  • epochTimeToHTTPDate runs in constant time. A huge value took minutes.
  • formatHTTPDate renders out-of-range numeric fields as underscores instead of non-digit characters.
  • parseHTTPDate accepts the RFC 850 and asctime formats, and rejects trailing garbage and dates which do not exist. Trailing whitespace is ignored.
  • httpDateToUTC clips out-of-range fields instead of wrapping them and keeps a leap second. New httpDateToUTCValid rejects them.
  • GHC 9.2 or later is required.

0.0.12

  • Security: formatHTTPDate read outside its tables if hdMonth or hdWkday was out of range (a huge value could crash). Such values are now rendered as ___.
  • epochTimeToHTTPDate with a negative value spent a lot of CPU time and returned a wrong date. It now returns the correct date.