package bhttp
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Binary Representation of HTTP Messages (RFC 9292) for OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.1.2.tar.gz
md5=6a31dba01d9ee06d1b0115516439d8b0
sha512=c2739c32cf8d44b36ca565052f6b14feaf99a029115e8d94dcd469bd363f7dacd8e401a4ca07c0a3555f0fe5572a37516b489ddd945ee9acae4ceafc29e7dadb
doc/CHANGES.html
Changelog
0.1.2 — 2026-10-04
Fixes for the CI of opam-repository; the libraries are those of 0.1.1.
- Mark the failure of
ohttp-piafon macOS with Homebrew as known to the CI of opam-repository: Piaf 0.2.0 includes OpenSSL's headers without asking pkg-config where they are, and Homebrew's are not on the compiler's path on Apple silicon. The guide to HTTP libraries shows how to build it there. - Fix the tests of the adapters, which could start two servers on one port and then exit in the middle of a run: each server now listens on a socket that it holds from the start.
0.1.1 — 2026-10-04
Package metadata only; the code is that of 0.1.0.
- Mark
ohttp-piafunavailable on Windows, where Piaf 0.2.0 does not build: its C stubs callfcntl, which MinGW lacks.
0.1.0 — 2026-10-04
- Add
bhttp, a codec for Binary HTTP (RFC 9292): known-length and indeterminate-length requests and responses, informational responses, trailers, padding, and truncation. Decoding accepts every integer size and every truncation that the RFC allows, and rejects invalid messages; encoding refuses to produce them. - Add
ohttp, an implementation of Oblivious HTTP (RFC 9458): key configurations in both of their encodings, and request and response encapsulation for clients and gateways over every KEM, KDF, and AEAD of thehpkepackage: 99 suites. A gateway accepts only what its keys advertise, and reports everything that a peer can cause as one error. - Provide the post-quantum KEMs of draft-ietf-hpke-pq-05 through
hpke: MLKEM768-X25519 (X-Wing), MLKEM768-P256, MLKEM1024-P384, and ML-KEM-512, 768, and 1024, beside the Diffie-Hellman KEMs, X448 among them. X-Wing is the one to choose. The one-stage SHAKE KDFs of the same draft are read in a key configuration but never chosen, since RFC 9458 derives the response keys withExtractandExpand. - Add
Ohttp.Replay, the defences of RFC 9458 Section 6.5 without I/O: a bounded cache of the encapsulated keys of recent requests, the check of a request'sdatefield in the three formats of RFC 9110, and thedateproblem type, through which a client learns the gateway's time and retries.Gateway.encapsulated_keyandChunked.Gateway.encapsulated_keygive the key to remember. The cohttp examples apply both sides. - Add
Ohttp.Http_messageandOhttp.Http_binding: exchanges of Binary HTTP messages, and the fields, checks, and error responses of RFC 9458 Section 5, without I/O. Examples over cohttp-lwt-unix show a client, a relay, a gateway, and a target, and run end to end withdune build @e2e. - Add
Ohttp.Service: the client, relay, and gateway of RFC 9458 Section 5 as steps from HTTP messages to HTTP messages, without I/O. The client adds adatefield and retries once, encapsulated anew, with the gateway's time when the gateway refuses its date; the relay passes on the content and its type and nothing else; the gateway serves its key configurations, checks for replay, forwards only to the targets it lists, and seals every answer once the encapsulation is off. - Add adapters for HTTP libraries, one package each, built on
Ohttp.Service:ohttp-cohttp-lwtfor any client of cohttp-lwt, with targets in the same process;ohttp-cohttp-eio; andohttp-piaf, over HTTP/1.1 and HTTP/2. Each has a client that fetches key configurations and calls through a relay, a relay handler, a gateway handler, and forwarding to targets.ohttp-cohttphas the conversions between the types of thehttppackage and those ofbhttpthat the two cohttp adapters share. The cohttp examples now useohttp-cohttp-lwt. - Bound what a relay or a gateway holds.
Ohttp.Service.Gateway.createand the newOhttp.Service.Relay.createtake the longest request to read, 1 MiB by default, and how many requests to handle at once, 256; a relay also takes the longest answer to read from its gateway, 8 MiB. The adapters' relay handlers take anOhttp.Service.Relay.t, and their clients andTarget.forwarda?max_response_size, 8 MiB by default. A message over its limit is refused from itscontent-lengthor once its content has been counted past the limit, with a 413, a 502, orError.Content_too_large, and a request beyond the number in flight with a 503. Rates and timeouts remain the deployment's. - Add
Ohttp.Chunked, an experimental implementation of chunked Oblivious HTTP (draft-ietf-ohai-chunked-ohttp-08): incremental senders and receivers for requests and responses, which take a stream in whatever slices a transport delivers and detect truncation. The interface may change before the draft is published as an RFC. - Reproduce the examples of RFC 9292 Section 5, RFC 9458 Appendix A, and the draft's Appendix A byte for byte, in both directions, from values that a script extracts from the pinned text of each document.
- Validate both packages against chris-wood/ohttp-go and martinthomson/ohttp with a differential harness, in both roles and for every suite in common, X448 and X-Wing with ohttp-go included, and replay what they produced in the test suites.
- Require
hpke0.4.0, for the post-quantum KEMs, the suite's KDF and AEAD, and the deterministic senders ofhpke.for_testing. Likehpkesince 0.3.0,ohttpneeds a 64-bit OCaml.bhttpstill has no dependencies. - Remain an unaudited, non-production release intended for interoperability review.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page