commit 6d0916e88fc8d9ee58ba1dc9f07599c2afb2f0d3
parent ee010e912f7ac09ea97c052db9229eae69426b5e
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 22 Jun 2025 13:49:08 +0200
add 'Cache-control: no-store' by default (fixes #9723)
Diffstat:
4 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/src/sync/sync-httpd2_backup-post.c b/src/sync/sync-httpd2_backup-post.c
@@ -207,7 +207,8 @@ make_payment_request (const char *order_id,
"Creating payment request for order `%s'\n",
order_id);
resp = MHD_response_from_empty (MHD_HTTP_STATUS_PAYMENT_REQUIRED);
- TALER_MHD2_add_global_headers (resp);
+ TALER_MHD2_add_global_headers (resp,
+ false);
{
char *hdr;
const char *pfx;
@@ -749,7 +750,8 @@ handle_upload (void *upload_cls,
struct MHD_Response *resp;
resp = MHD_response_from_empty (MHD_HTTP_STATUS_NOT_MODIFIED);
- TALER_MHD2_add_global_headers (resp);
+ TALER_MHD2_add_global_headers (resp,
+ false);
return MHD_upload_action_from_response (request,
resp);
}
@@ -760,7 +762,8 @@ handle_upload (void *upload_cls,
struct MHD_Response *resp;
resp = MHD_response_from_empty (MHD_HTTP_STATUS_NO_CONTENT);
- TALER_MHD2_add_global_headers (resp);
+ TALER_MHD2_add_global_headers (resp,
+ false);
return MHD_upload_action_from_response (request,
resp);
}
@@ -944,7 +947,8 @@ SH_backup_post (struct MHD_Request *request,
struct MHD_Response *resp;
resp = MHD_response_from_empty (MHD_HTTP_STATUS_NOT_MODIFIED);
- TALER_MHD2_add_global_headers (resp);
+ TALER_MHD2_add_global_headers (resp,
+ false);
return MHD_action_from_response (request,
resp);
}
diff --git a/src/sync/sync-httpd2_backup.c b/src/sync/sync-httpd2_backup.c
@@ -77,7 +77,8 @@ SH_backup_get (struct MHD_Request *request,
struct MHD_Response *resp;
resp = MHD_response_from_empty (MHD_HTTP_STATUS_NO_CONTENT);
- TALER_MHD2_add_global_headers (resp);
+ TALER_MHD2_add_global_headers (resp,
+ false);
return MHD_action_from_response (request,
resp);
}
@@ -113,7 +114,8 @@ SH_backup_get (struct MHD_Request *request,
struct MHD_Response *resp;
resp = MHD_response_from_empty (MHD_HTTP_STATUS_NOT_MODIFIED);
- TALER_MHD2_add_global_headers (resp);
+ TALER_MHD2_add_global_headers (resp,
+ false);
return MHD_action_from_response (request,
resp);
}
@@ -196,7 +198,8 @@ SH_make_backup (const struct SYNC_AccountPublicKeyP *account,
backup,
&free,
backup);
- TALER_MHD2_add_global_headers (resp);
+ TALER_MHD2_add_global_headers (resp,
+ false);
{
char *sig_s;
char *prev_s;
diff --git a/src/sync/sync-httpd_backup.c b/src/sync/sync-httpd_backup.c
@@ -80,7 +80,8 @@ SH_backup_get (struct MHD_Connection *connection,
resp = MHD_create_response_from_buffer (0,
NULL,
MHD_RESPMEM_PERSISTENT);
- TALER_MHD_add_global_headers (resp);
+ TALER_MHD_add_global_headers (resp,
+ false);
ret = MHD_queue_response (connection,
MHD_HTTP_NO_CONTENT,
resp);
@@ -121,7 +122,8 @@ SH_backup_get (struct MHD_Connection *connection,
resp = MHD_create_response_from_buffer (0,
NULL,
MHD_RESPMEM_PERSISTENT);
- TALER_MHD_add_global_headers (resp);
+ TALER_MHD_add_global_headers (resp,
+ false);
ret = MHD_queue_response (connection,
MHD_HTTP_NOT_MODIFIED,
resp);
@@ -219,7 +221,8 @@ SH_return_backup (struct MHD_Connection *connection,
resp = MHD_create_response_from_buffer (backup_size,
backup,
MHD_RESPMEM_MUST_FREE);
- TALER_MHD_add_global_headers (resp);
+ TALER_MHD_add_global_headers (resp,
+ false);
{
char *sig_s;
char *prev_s;
diff --git a/src/sync/sync-httpd_backup_post.c b/src/sync/sync-httpd_backup_post.c
@@ -233,7 +233,8 @@ make_payment_request (const char *order_id,
resp = MHD_create_response_from_buffer (0,
NULL,
MHD_RESPMEM_PERSISTENT);
- TALER_MHD_add_global_headers (resp);
+ TALER_MHD_add_global_headers (resp,
+ false);
{
char *hdr;
const char *pfx;
@@ -869,7 +870,8 @@ SH_backup_post (struct MHD_Connection *connection,
resp = MHD_create_response_from_buffer (0,
NULL,
MHD_RESPMEM_PERSISTENT);
- TALER_MHD_add_global_headers (resp);
+ TALER_MHD_add_global_headers (resp,
+ false);
ret = MHD_queue_response (connection,
MHD_HTTP_NOT_MODIFIED,
resp);
@@ -1007,7 +1009,8 @@ SH_backup_post (struct MHD_Connection *connection,
resp = MHD_create_response_from_buffer (0,
NULL,
MHD_RESPMEM_PERSISTENT);
- TALER_MHD_add_global_headers (resp);
+ TALER_MHD_add_global_headers (resp,
+ false);
ret = MHD_queue_response (connection,
MHD_HTTP_NOT_MODIFIED,
resp);
@@ -1025,7 +1028,8 @@ SH_backup_post (struct MHD_Connection *connection,
resp = MHD_create_response_from_buffer (0,
NULL,
MHD_RESPMEM_PERSISTENT);
- TALER_MHD_add_global_headers (resp);
+ TALER_MHD_add_global_headers (resp,
+ false);
ret = MHD_queue_response (connection,
MHD_HTTP_NO_CONTENT,
resp);