From: Eric Covener Date: Fri, 5 Jun 2026 10:03:07 +0000 (+0000) Subject: merge_response_headers: fix lang iteration X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=7ccdcb3a47fc440a041df7b3cf45e1ff40e0f7c3;p=thirdparty%2Fapache%2Fhttpd.git merge_response_headers: fix lang iteration git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1935005 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index 3b042c34c1..1c0e1782bd 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -2135,10 +2135,10 @@ static void merge_response_headers(request_rec *r) if (!apr_is_empty_array(r->content_languages)) { int i; char *token; - char **languages = (char **)(r->content_languages->elts); const char *field = apr_table_get(r->headers_out, "Content-Language"); while (field && (token = ap_get_list_item(r->pool, &field)) != NULL) { + char **languages = (char **)(r->content_languages->elts); for (i = 0; i < r->content_languages->nelts; ++i) { if (!ap_cstr_casecmp(token, languages[i])) break; diff --git a/modules/http2/h2_c2_filter.c b/modules/http2/h2_c2_filter.c index 7874cae138..17a2c131d8 100644 --- a/modules/http2/h2_c2_filter.c +++ b/modules/http2/h2_c2_filter.c @@ -307,10 +307,10 @@ static h2_headers *create_response(request_rec *r) if (!apr_is_empty_array(r->content_languages)) { int i; char *token; - char **languages = (char **)(r->content_languages->elts); const char *field = apr_table_get(r->headers_out, "Content-Language"); while (field && (token = ap_get_list_item(r->pool, &field)) != NULL) { + char **languages = (char **)(r->content_languages->elts); for (i = 0; i < r->content_languages->nelts; ++i) { if (!ap_cstr_casecmp(token, languages[i])) break;