This commit is contained in:
swrup 2026-03-03 10:09:03 +01:00
parent d0ddee257e
commit bcc940100a
20 changed files with 112 additions and 130 deletions

View file

@ -6,7 +6,8 @@ let accept_header_value =
let avail_languages_header_value =
Fmt.str "%a" (Fmt.array ~sep:(Fmt.any ", ") Fmt.string) Assets.Language.arr
(* TODO Cohttp raises on invalid *)
(* TODO better headers_lib
Cohttp raises on invalid *)
let select_mimetype headers =
let opt = Vif.Headers.get headers "accept" in
Cohttp.Accept.media_ranges opt