summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Kew <niq@apache.org>2017-12-16 23:05:01 +0100
committerNick Kew <niq@apache.org>2017-12-16 23:05:01 +0100
commite1c94991838feb897f2623b7758b181629f55510 (patch)
tree4a225441ee9e7f1fcbdb31dd22c56cfe2e184727
parentFix typo (diff)
downloadapache2-e1c94991838feb897f2623b7758b181629f55510.tar.xz
apache2-e1c94991838feb897f2623b7758b181629f55510.zip
mod_proxy_html: fix metafix handling of <meta http-equiv> elements
PR#58121 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1818457 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--modules/filters/mod_proxy_html.c12
2 files changed, 9 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index af35966b7d..4bccfd0149 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.1
+ *) mod_proxy_html: fix handling of <meta http-equiv> elements.
+ PR 58121. [Nick Kew]
+
*) mod_md: fixed backward compatibility to old <ManagedDomain configuration.
Add higher level WARNING log when initial request to ACME server fails, mentioning
some advice. [Stefan Eissing]
diff --git a/modules/filters/mod_proxy_html.c b/modules/filters/mod_proxy_html.c
index fc28b278d9..ffa70c366e 100644
--- a/modules/filters/mod_proxy_html.c
+++ b/modules/filters/mod_proxy_html.c
@@ -684,7 +684,12 @@ static meta *metafix(request_rec *r, const char *buf)
while (!apr_isalpha(*++p));
for (q = p; apr_isalnum(*q) || (*q == '-'); ++q);
header = apr_pstrndup(r->pool, p, q-p);
- if (ap_cstr_casecmpn(header, "Content-", 8)) {
+ if (!ap_cstr_casecmpn(header, "Content-Type", 12)) {
+ ret = apr_palloc(r->pool, sizeof(meta));
+ ret->start = offs+pmatch[0].rm_so;
+ ret->end = offs+pmatch[0].rm_eo;
+ }
+ else {
/* find content=... string */
p = apr_strmatch(seek_content, buf+offs+pmatch[0].rm_so,
pmatch[0].rm_eo - pmatch[0].rm_so);
@@ -712,11 +717,6 @@ static meta *metafix(request_rec *r, const char *buf)
}
}
}
- else if (!ap_cstr_casecmpn(header, "Content-Type", 12)) {
- ret = apr_palloc(r->pool, sizeof(meta));
- ret->start = offs+pmatch[0].rm_so;
- ret->end = offs+pmatch[0].rm_eo;
- }
if (header && content) {
#ifndef GO_FASTER
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,