From 4d1319daadf9d2ebd656fe207c3dc653fdaa5413 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 12 Dec 2023 16:07:10 +0100 Subject: return Content-Language header in legal responses --- src/mhd/mhd_legal.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/mhd/mhd_legal.c b/src/mhd/mhd_legal.c index 137cc436a..0f110baa3 100644 --- a/src/mhd/mhd_legal.c +++ b/src/mhd/mhd_legal.c @@ -360,6 +360,10 @@ TALER_MHD_reply_legal (struct MHD_Connection *conn, MHD_add_response_header (resp, MHD_HTTP_HEADER_CONTENT_TYPE, t->mime_type)); + GNUNET_break (MHD_YES == + MHD_add_response_header (resp, + MHD_HTTP_HEADER_CONTENT_LANGUAGE, + t->language)); { MHD_RESULT ret; -- cgit v1.2.3 From a14e263ac512c66dfd6e40e8af4f6b87dd410cdf Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 13 Dec 2023 12:51:19 +0900 Subject: do not return the same language more than once in the list --- src/mhd/mhd_legal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mhd/mhd_legal.c b/src/mhd/mhd_legal.c index 0f110baa3..5a600953e 100644 --- a/src/mhd/mhd_legal.c +++ b/src/mhd/mhd_legal.c @@ -260,7 +260,8 @@ TALER_MHD_reply_legal (struct MHD_Connection *conn, { langs = GNUNET_strdup (p->language); } - else + else if (NULL == strstr (langs, + p->language)) { char *tmp = langs; -- cgit v1.2.3