module Whitespace : sig ... endWhitespace.t specifies how to handle header values. It is used in two contexts:
module Name : sig ... endmodule Value : sig ... endinclude sig ... endval hash_fold_t : Base.Hash.state ‑> t ‑> Base.Hash.stateval hash : t ‑> Base.Hash.hash_valueval sexp_of_t : t ‑> Base.Sexp.tval to_string_monoid : ?eol:Email_message__.Lf_or_crlf.t ‑> t ‑> Email_message.String_monoid.teol defaults to `LF
val to_string : ?eol:Email_message__.Lf_or_crlf.t ‑> t ‑> stringval empty : tval of_list : whitespace:Whitespace.t ‑> (Name.t * Value.t) list ‑> tval to_list : ?whitespace:Whitespace.t ‑> t ‑> (Name.t * Value.t) listval last : ?whitespace:Whitespace.t ‑> t ‑> Name.t ‑> Value.t optionval find_all : ?whitespace:Whitespace.t ‑> t ‑> Name.t ‑> Value.t listval add : ?whitespace:Whitespace.t ‑> t ‑> name:Name.t ‑> value:Value.t ‑> tval add_at_bottom : ?whitespace:Whitespace.t ‑> t ‑> name:Name.t ‑> value:Value.t ‑> tval add_if_missing : ?whitespace:Whitespace.t ‑> t ‑> name:Name.t ‑> value:Value.t ‑> tval add_at_bottom_if_missing : ?whitespace:Whitespace.t ‑> t ‑> name:Name.t ‑> value:Value.t ‑> tval set : ?whitespace:Whitespace.t ‑> t ‑> name:Name.t ‑> value:Value.t ‑> tval set_at_bottom : ?whitespace:Whitespace.t ‑> t ‑> name:Name.t ‑> value:Value.t ‑> tval add_all : ?whitespace:Whitespace.t ‑> t ‑> (Name.t * Value.t) list ‑> tval add_all_at_bottom : ?whitespace:Whitespace.t ‑> t ‑> (Name.t * Value.t) list ‑> tval smash_and_add : ?whitespace:Whitespace.t ‑> t ‑> name:Name.t ‑> value:Value.t ‑> tIf headers with this name already exist, concatenates the values for all separated by a comma, and appends the new value. Otherwise, creates a new header.
val filter : ?whitespace:Whitespace.t ‑> t ‑> f:(name:Name.t ‑> value:Value.t ‑> bool) ‑> trewrite header values, preserving original whitespace where possible.
whitespace is used to Value.of_string ?whitespace the ~value before passing to f,
and again to Value.to_string ?whitespace the result.
If the ~value and f ~name ~value are the same no change will be made (white space is preserved).
Particularly the following is an identity transform:
map ~whitespace:`Normalize ~f:(fun ~name:_ ~value -> Value.of_string ~whitespace:`Normalize value) .
By contrast the following will 'normalize' the whitespace on all headers.
map ~whitespace:`Raw ~f:(fun ~name:_ ~value -> Value.of_string ~whitespace:`Normalize value) .
module Stable : sig ... end