You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ni...@apache.org on 2017/12/16 22:05:01 UTC
svn commit: r1818457 - in /httpd/httpd/trunk: CHANGES
modules/filters/mod_proxy_html.c
Author: niq
Date: Sat Dec 16 22:05:01 2017
New Revision: 1818457
URL: http://svn.apache.org/viewvc?rev=1818457&view=rev
Log:
mod_proxy_html: fix metafix handling of <meta http-equiv> elements
PR#58121
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/filters/mod_proxy_html.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1818457&r1=1818456&r2=1818457&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sat Dec 16 22:05:01 2017
@@ -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]
Modified: httpd/httpd/trunk/modules/filters/mod_proxy_html.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_proxy_html.c?rev=1818457&r1=1818456&r2=1818457&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_proxy_html.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_proxy_html.c Sat Dec 16 22:05:01 2017
@@ -684,7 +684,12 @@ static meta *metafix(request_rec *r, con
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, con
}
}
}
- 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,