better if-not-match

This commit is contained in:
swrup 2026-02-12 11:25:57 +01:00
parent c4475d6908
commit 7baba82a10
7 changed files with 107 additions and 106 deletions

View file

@ -6,6 +6,7 @@ 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 *)
let select_mimetype headers =
let opt = Vif.Headers.get headers "accept" in
Cohttp.Accept.media_ranges opt