add taler-terms-version header
This commit is contained in:
parent
bed6e3fec1
commit
0a0eac7cd9
1 changed files with 6 additions and 2 deletions
|
|
@ -34,10 +34,9 @@ module Static = struct
|
|||
- and finally apply compression if that is allowed by the client
|
||||
- set ETAG header
|
||||
- If it did not change, a "304 Not Modified" response will be returned
|
||||
- A "Taler-Terms-Version" header is generated to indicate the legal version of the terms
|
||||
|
||||
TODO:
|
||||
- The ETAG is encoded in Crockford base-32
|
||||
- A "Taler-Terms-Version" header is generated to indicate the legal version of the terms
|
||||
- When returning a full response (not a "304 Not Modified"), the server
|
||||
should also include a "Avail-Languages" header which includes a
|
||||
comma-separated list of the languages in which the terms of service are available in
|
||||
|
|
@ -71,6 +70,11 @@ module Static = struct
|
|||
let* () = Vif.Response.with_string ?compression req data in
|
||||
let etag_field_value = Headers.Etag.to_field_value etag in
|
||||
let* () = Vif.Response.add ~field:"etag" etag_field_value in
|
||||
let* () =
|
||||
(* todo: is it "taler-privacy-version" for /policy ? *)
|
||||
Vif.Response.add ~field:"taler-terms-version"
|
||||
Config.terms_legal_version
|
||||
in
|
||||
(* TODO content-type *)
|
||||
let* () =
|
||||
Vif.Response.add ~field:"content-type" "html; charset=utf-8"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue