commit 267cf549b10f668a2779d04800648aa42bcc22c2
parent ba84aba61bc56e38173af55936b81685f01c7f88
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 16 Jun 2025 23:13:30 +0200
implement #10109: remove cache control from /config
Diffstat:
1 file changed, 1 insertion(+), 30 deletions(-)
diff --git a/src/challenger/challenger-httpd_config.c b/src/challenger/challenger-httpd_config.c
@@ -41,32 +41,11 @@ CH_handler_config (struct CH_HandlerContext *hc,
size_t *upload_data_size)
{
static struct MHD_Response *response;
- static struct GNUNET_TIME_Absolute a;
(void) upload_data;
(void) upload_data_size;
- if ( (GNUNET_TIME_absolute_is_past (a)) &&
- (NULL != response) )
- {
- MHD_destroy_response (response);
- response = NULL;
- }
if (NULL == response)
{
- 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);
response = TALER_MHD_MAKE_JSON_PACK (
GNUNET_JSON_pack_string ("implementation",
"urn:net:taler:specs:challenger:c-reference"),
@@ -77,15 +56,7 @@ CH_handler_config (struct CH_HandlerContext *hc,
GNUNET_JSON_pack_object_incref ("restrictions",
CH_restrictions),
GNUNET_JSON_pack_string ("version",
- "5:0:3"));
- GNUNET_break (MHD_YES ==
- MHD_add_response_header (response,
- MHD_HTTP_HEADER_EXPIRES,
- dat));
- GNUNET_break (MHD_YES ==
- MHD_add_response_header (response,
- MHD_HTTP_HEADER_CACHE_CONTROL,
- "public,max-age=21600")); /* 6h */
+ "5:1:3"));
}
return MHD_queue_response (hc->connection,
MHD_HTTP_OK,