aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-04-21 10:27:30 +0200
committerChristian Grothoff <christian@grothoff.org>2024-04-21 10:27:35 +0200
commitf2f8e00fa6fa44a6a5bcf49f4a868292126e1f8a (patch)
tree1eff002fbba53b459925d5e70ef6a65f5dc19429 /src
parenta715749a1bfa5553fede1c161c3c00e1d6c87e66 (diff)
fix cache control for /config: rebuild response after it expired
Diffstat (limited to 'src')
-rw-r--r--src/backend/taler-merchant-httpd_config.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/taler-merchant-httpd_config.c b/src/backend/taler-merchant-httpd_config.c
index 3777904f..d1340249 100644
--- a/src/backend/taler-merchant-httpd_config.c
+++ b/src/backend/taler-merchant-httpd_config.c
@@ -42,7 +42,7 @@
* #MERCHANT_PROTOCOL_CURRENT and #MERCHANT_PROTOCOL_AGE in
* merchant_api_config.c!
*/
-#define MERCHANT_PROTOCOL_VERSION "14:0:10"
+#define MERCHANT_PROTOCOL_VERSION "14:1:10"
/**
@@ -82,14 +82,20 @@ MH_handler_config (struct TMH_RequestHandler *rh,
struct TMH_HandlerContext *hc)
{
static struct MHD_Response *response;
+ static struct GNUNET_TIME_Absolute a;
(void) rh;
(void) hc;
+ if ( (GNUNET_TIME_absolute_is_past (a)) &&
+ (NULL != response) )
+ {
+ MHD_destroy_response (response);
+ response = NULL;
+ }
if (NULL == response)
{
json_t *specs = json_object ();
json_t *exchanges = json_array ();
- struct GNUNET_TIME_Absolute a;
struct GNUNET_TIME_Timestamp km;
char dat[128];