merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit f2f8e00fa6fa44a6a5bcf49f4a868292126e1f8a
parent a715749a1bfa5553fede1c161c3c00e1d6c87e66
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 21 Apr 2024 10:27:30 +0200

fix cache control for /config: rebuild response after it expired

Diffstat:
Msrc/backend/taler-merchant-httpd_config.c | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 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];