package ohttp-cohttp-lwt

  1. Overview
  2. Docs
Oblivious HTTP (RFC 9458) clients, relays, and gateways over cohttp-lwt

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1.2.tar.gz
md5=6a31dba01d9ee06d1b0115516439d8b0
sha512=c2739c32cf8d44b36ca565052f6b14feaf99a029115e8d94dcd469bd363f7dacd8e401a4ca07c0a3555f0fe5572a37516b489ddd945ee9acae4ceafc29e7dadb

doc/ohttp-cohttp-lwt/Ohttp_cohttp_lwt/Gateway/index.html

Module Ohttp_cohttp_lwt.GatewaySource

A gateway: its key configurations, and the resource to which relays send Encapsulated Requests.

Sourceval handler : ?path:string -> ?now:(unit -> float) -> Ohttp.Service.Gateway.t -> forward -> handler

Serves key_configs at Ohttp.Http_binding.well_known_gateway_path, requests at path, "/gateway" by default, and a 404 elsewhere.

Answers with the key configurations, whatever the request.

Sourceval requests : ?now:(unit -> float) -> Ohttp.Service.Gateway.t -> forward -> handler

Answers an Encapsulated Request with an Encapsulated Response, through Ohttp.Service.Gateway.receive. now is the clock of the replay check, Unix.gettimeofday by default.

A request longer than the max_request_size of service is answered with Ohttp.Service.content_too_large, and one that arrives while max_in_flight are being answered with Ohttp.Service.busy, both in the clear.

An exception raised by forward is answered with a sealed 500: once the encapsulation is removed, every answer goes back sealed.