wip management todo
This commit is contained in:
parent
0325cd9167
commit
14666fb836
6 changed files with 158 additions and 33 deletions
|
|
@ -1,11 +1,10 @@
|
|||
(* independent library for headers fields value *)
|
||||
|
||||
(* TODO
|
||||
- test
|
||||
- can still bypass this module and directly set Etag header, but its fine *)
|
||||
(* TODO - test - can still bypass this module and directly set Etag header, but
|
||||
its fine *)
|
||||
module Etag : sig
|
||||
(* module to parse etags header fields
|
||||
used by If-Match and If-None-Match headers
|
||||
(* module to parse etags header fields used by If-Match and If-None-Match
|
||||
headers
|
||||
|
||||
https://httpwg.org/specs/rfc9110.html#field.etag *)
|
||||
type t
|
||||
|
|
@ -70,12 +69,12 @@ end = struct
|
|||
else invalid_etag))
|
||||
|> Result.map (fun l -> Etag_list l)
|
||||
|
||||
(* To evaluate a received If-None-Match header field:
|
||||
- If the field value is "*", the condition is false
|
||||
if the origin server has a current representation for the target resource.
|
||||
- If the field value is a list of entity tags, the condition is false
|
||||
if one of the listed tags matches the entity tag of the selected representation.
|
||||
- Otherwise, the condition is true. *)
|
||||
(* To evaluate a received If-None-Match header field: - If the field value is
|
||||
"*", the condition is false if the origin server has a current
|
||||
representation for the target resource. - If the field value is a list of
|
||||
entity tags, the condition is false if one of the listed tags matches the
|
||||
entity tag of the selected representation. - Otherwise, the condition is
|
||||
true. *)
|
||||
let evaluate t header_value =
|
||||
match header_value with
|
||||
| Any_etag -> false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue