exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit c85b01e2649b17d6f189271eedaebfcbb75c26d9
parent 1770c5a3b5bae1611660b6c64d8cbb924b541879
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 16 Jun 2025 23:12:18 +0200

implement #10109: remove cache control from /config

Diffstat:
Msrc/exchange/taler-exchange-httpd_config.c | 30------------------------------
1 file changed, 0 insertions(+), 30 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_config.c b/src/exchange/taler-exchange-httpd_config.c @@ -33,31 +33,10 @@ TEH_handler_config (struct TEH_RequestContext *rc, const char *const args[]) { static struct MHD_Response *resp; - static struct GNUNET_TIME_Absolute a; (void) args; - if ( (GNUNET_TIME_absolute_is_past (a)) && - (NULL != resp) ) - { - MHD_destroy_response (resp); - resp = NULL; - } if (NULL == resp) { - struct GNUNET_TIME_Timestamp km; - char dat[128]; - - a = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_DAYS); - /* Round up to next full day to ensure the expiration - time does not become a fingerprint! */ - a = GNUNET_TIME_absolute_round_down (a, - GNUNET_TIME_UNIT_DAYS); - a = GNUNET_TIME_absolute_add (a, - GNUNET_TIME_UNIT_DAYS); - /* => /config response stays at most 48h in caches! */ - km = GNUNET_TIME_absolute_to_timestamp (a); - TALER_MHD_get_date_string (km.abs_time, - dat); resp = TALER_MHD_MAKE_JSON_PACK ( GNUNET_JSON_pack_allow_null ( GNUNET_JSON_pack_array_steal ( @@ -89,15 +68,6 @@ TEH_handler_config (struct TEH_RequestContext *rc, GNUNET_JSON_pack_string ( "version", EXCHANGE_PROTOCOL_VERSION)); - - GNUNET_break (MHD_YES == - MHD_add_response_header (resp, - MHD_HTTP_HEADER_EXPIRES, - dat)); - GNUNET_break (MHD_YES == - MHD_add_response_header (resp, - MHD_HTTP_HEADER_CACHE_CONTROL, - "public,max-age=21600")); /* 6h */ } return MHD_queue_response (rc->connection, MHD_HTTP_OK,