A batteries included HTTP/1.1 client in OCaml

Fix build warnings and odoc documentation errors

- Add explicit unix library dependency to dune files (html5rw, tomlt)
- Fix odoc heading levels ({0 -> {1) in imap subject.mli and thread.mli
- Fix code block indentation in subject.mli and h2_stream.mli
- Change unresolved module references to plain text (Bytesrw_unix,
Bytesrw_eio, Webfinger.Jrd.t)
- Fix @raise tags to use Error instead of Error.t
- Escape @mention/@mentions text in poe docs to avoid unknown tag warnings
- Remove unreachable flag_perm rule and redundant list_mailbox production
from IMAP grammar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+34 -34
+1 -1
lib/h1/http_client.mli
··· 36 36 Supports gzip, deflate (both raw and zlib-wrapped), and identity encodings. 37 37 Unknown encodings return the body unchanged with a warning logged. 38 38 39 - @raise Error.t if decompression would exceed size or ratio limits 39 + @raise Error if decompression would exceed size or ratio limits 40 40 (decompression bomb protection). *) 41 41 42 42 (** {1 Request Execution} *)
+3 -3
lib/h1/http_read.mli
··· 41 41 42 42 val status_code : Eio.Buf_read.t -> int 43 43 (** [status_code r] parses a 3-digit HTTP status code. 44 - @raise Error.t if the status code is invalid. *) 44 + @raise Error if the status code is invalid. *) 45 45 46 46 val status_line : Eio.Buf_read.t -> http_version * int 47 47 (** [status_line r] parses a complete HTTP status line and returns 48 48 the HTTP version and status code as a tuple. 49 49 Validates that the HTTP version is 1.0 or 1.1. 50 - @raise Error.t if the status line is invalid. *) 50 + @raise Error if the status line is invalid. *) 51 51 52 52 (** {1 Header Parsing} *) 53 53 ··· 84 84 (** [validate_transfer_encoding codings] validates Transfer-Encoding per RFC 9112 Section 6.1. 85 85 Returns [`Chunked] if chunked encoding should be used, [`None] if no body, 86 86 or [`Unsupported codings] for unsupported encodings without chunked. 87 - @raise Error.t if chunked is not final encoding (RFC violation). *) 87 + @raise Error if chunked is not final encoding (RFC violation). *) 88 88 89 89 val validate_no_transfer_encoding : 90 90 method_:Method.t option -> status:int -> string option -> bool
+30 -30
lib/h2/h2_stream.mli
··· 39 39 40 40 {2 Stream States} 41 41 42 - {v 43 - +--------+ 44 - send PP | | recv PP 45 - ,--------+ idle +--------. 46 - / | | \ 47 - v +--------+ v 48 - +----------+ | +----------+ 49 - | | | send H / | | 50 - ,------+ reserved | | recv H | reserved +------. 51 - | | (local) | | | (remote) | | 52 - | +---+------+ v +------+---+ | 53 - | | +--------+ | | 54 - | | recv ES | | send ES | | 55 - | send H | ,-------+ open +-------. | recv H | 56 - | | / | | \ | | 57 - | v v +---+----+ v v | 58 - | +----------+ | +----------+ | 59 - | | half- | | | half- | | 60 - | | closed | | send R / | closed | | 61 - | | (remote) | | recv R | (local) | | 62 - | +----+-----+ | +-----+----+ | 63 - | | | | | 64 - | | send ES / | recv ES / | | 65 - | | send R / v send R / | | 66 - | | recv R +--------+ recv R | | 67 - | send R / `----------->| |<-----------' send R / | 68 - | recv R | closed | recv R | 69 - `----------------------->| |<-----------------------' 70 - +--------+ 71 - v} 42 + {v 43 + +--------+ 44 + send PP | | recv PP 45 + ,--------+ idle +--------. 46 + / | | \ 47 + v +--------+ v 48 + +----------+ | +----------+ 49 + | | | send H / | | 50 + ,------+ reserved | | recv H | reserved +------. 51 + | | (local) | | | (remote) | | 52 + | +---+------+ v +------+---+ | 53 + | | +--------+ | | 54 + | | recv ES | | send ES | | 55 + | send H | ,-------+ open +-------. | recv H | 56 + | | / | | \ | | 57 + | v v +---+----+ v v | 58 + | +----------+ | +----------+ | 59 + | | half- | | | half- | | 60 + | | closed | | send R / | closed | | 61 + | | (remote) | | recv R | (local) | | 62 + | +----+-----+ | +-----+----+ | 63 + | | | | | 64 + | | send ES / | recv ES / | | 65 + | | send R / v send R / | | 66 + | | recv R +--------+ recv R | | 67 + | send R / `----------->| |<-----------' send R / | 68 + | recv R | closed | recv R | 69 + `----------------------->| |<-----------------------' 70 + +--------+ 71 + v} 72 72 73 73 {2 Usage} 74 74