diff options
author | Nick Kew <niq@apache.org> | 2017-11-27 14:34:09 +0000 |
---|---|---|
committer | Nick Kew <niq@apache.org> | 2017-11-27 14:34:09 +0000 |
commit | 31ef7748845ab6f07a5f2fec4f35747470c47583 (patch) | |
tree | a7ab4390cc02025126aae181f977abc34d05f5d0 | |
parent | cebf4cd19339376f720e9ede42369403b31f6c75 (diff) | |
download | httpd-31ef7748845ab6f07a5f2fec4f35747470c47583.tar.gz |
The other half of r1442409: fix mod_proxy_html doctype-handling typos
PR 56457
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1816458 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | modules/filters/mod_proxy_html.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/modules/filters/mod_proxy_html.c b/modules/filters/mod_proxy_html.c index 743f143780..fc28b278d9 100644 --- a/modules/filters/mod_proxy_html.c +++ b/modules/filters/mod_proxy_html.c @@ -401,28 +401,22 @@ static void pstartElement(void *ctxt, const xmlChar *uname, int enforce = 0; if ((ctx->cfg->doctype == fpi_html) || (ctx->cfg->doctype == fpi_xhtml)) { /* enforce html */ - enforce = 2; - if (!desc || desc->depr) + if (!desc || desc->depr) { + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r, APLOGNO(01416) + "Bogus HTML element %s dropped", name); return; - + } + enforce = 2; } - else if ((ctx->cfg->doctype == fpi_html) - || (ctx->cfg->doctype == fpi_xhtml)) { - enforce = 1; + else if ((ctx->cfg->doctype == fpi_html_legacy) + || (ctx->cfg->doctype == fpi_xhtml_legacy)) { /* enforce html legacy */ if (!desc) { + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r, APLOGNO(01417) + "Deprecated HTML element %s dropped", name); return; } - } - if (!desc && enforce) { - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r, APLOGNO(01416) - "Bogus HTML element %s dropped", name); - return; - } - if (desc && desc->depr && (enforce == 2)) { - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r, APLOGNO(01417) - "Deprecated HTML element %s dropped", name); - return; + enforce = 1; } #ifdef HAVE_STACK descp = apr_array_push(ctx->stack); |