An OCaml webserver, but the allocating version (vs httpz which doesnt)
1(** HTTP header name enumeration. *)
2
3type t =
4 | Cache_control
5 | Connection
6 | Date
7 | Transfer_encoding
8 | Upgrade
9 | Via
10 | Accept
11 | Accept_charset
12 | Accept_encoding
13 | Accept_language
14 | Accept_ranges
15 | Authorization
16 | Cookie
17 | Expect
18 | Host
19 | If_match
20 | If_modified_since
21 | If_none_match
22 | If_range
23 | If_unmodified_since
24 | Range
25 | Referer
26 | User_agent
27 | Age
28 | Etag
29 | Location
30 | Retry_after
31 | Server
32 | Set_cookie
33 | Www_authenticate
34 | Allow
35 | Content_disposition
36 | Content_encoding
37 | Content_language
38 | Content_length
39 | Content_location
40 | Content_range
41 | Content_type
42 | Expires
43 | Last_modified
44 | X_forwarded_for
45 | X_forwarded_proto
46 | X_forwarded_host
47 | X_request_id
48 | X_correlation_id
49 | Other
50 (** [Other] indicates an unknown header; the actual name is stored in the header's
51 [name_span] field. *)
52
53(** Canonical display name for known headers. Returns ["(unknown)"] for [Other]. *)
54val canonical : t -> string
55
56(** Canonical display name for headers. Returns ["(unknown)"] for [Other]. *)
57val to_string : Base_bigstring.t -> t -> string
58
59(** Lowercase canonical name for known headers. Returns [""] for [Other]. *)
60val lowercase : t -> string
61
62(** Parse header name from span. *)
63val of_span : Base_bigstring.t -> Span.t -> t
64
65(** Pretty-print header name. *)
66val pp : Stdlib.Format.formatter -> t -> unit