From 0a0eac7cd9ba5c6bbe9b9d74c7e7b9cc03f4351e Mon Sep 17 00:00:00 2001 From: Swrup Date: Sun, 28 Sep 2025 18:23:43 +0200 Subject: [PATCH] add taler-terms-version header --- src/mte.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mte.ml b/src/mte.ml index 5f3268d7..3afa7d3c 100644 --- a/src/mte.ml +++ b/src/mte.ml @@ -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"