[ANN] http-date v0.2 — Zero-dependency HTTP date parsing for OCaml

I just released v0.2 of http-date, an RFC 9110 compliant HTTP datetime decoder/encoder for OCaml.

This is a major rewrite from v0.1. Here’s what changed:

Zero dependencies — Replaced the ocamllex/menhir parser with a hand-written implementation and removed the ptime
dependency entirely. The library now only requires ocaml and dune.

New type-safe API — The parsed result is now a polymorphic variant tagged by format (

IMF,

RFC850, `ASCTIME), so you
always know which HTTP date format was parsed. The dayname, date, time, and datetime types are all exposed in the
public API.

Serious testing — Added property-based tests with alcobar and AFL fuzz testing infrastructure to build confidence in
the hand-written parser.

If you’re working with HTTP headers in OCaml, give it a try:

opam install http-date

https://github.com/bikallem/http-date

7 Likes