-*- coding: utf-8 -*-
Changes with Apache 2.4.30
+
+ *) mod_proxy_html: process parsed comments immediately.
+ Fixes bug (seen in the wild when used with IBM's HTTPD bundle)
+ where parsed comments may be lost. [Nick Kew]
+
+ *) mod_proxy_html: introduce doctype for HTML 5 [Nick Kew]
+
+ *) mod_proxy_html: fix typo-bug processing "strict" vs "transitional"
+ HTML/XHTML. PR 56457 [Nick Kew]
*) mpm_event: avoid a very unlikely race condition between the listener and
the workers when the latter fails to add a connection to the pollset.
trunk revisions: 1804530,1804531,1805186,1806939,1807232,1808122
2.4.x patch: https://svn.apache.org/repos/asf/httpd/httpd/patches/2.4.x/mod_ssl_minimal_md.diff
+1: icing, jorton, jim
-
- *) mod_proxy_html: Add HTML5 FPI, fix typo in handling legacy FPIs,
- process parsed comments immediately. Fix PR 56457
- trunk patch: http://svn.apache.org/r1442409
- http://svn.apache.org/r1816458
- 2.4.x patch: svn merge -c r1442409,r1816458 ^/httpd/httpd/trunk .
- +1: niq, covener, elukey
+ [niq: I was about to backport along with the mod_proxy_html accepted
+ patch, but I see this is on hold pending mod_md.h]
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
static const char *const fpi_xhtml_legacy =
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
+static const char *const fpi_html5 = "<!DOCTYPE html>\n";
static const char *const html_etag = ">";
static const char *const xhtml_etag = " />";
/*#define DEFAULT_DOCTYPE fpi_html */
ap_fputs(ctx->f->next, ctx->bb, "<!--");
AP_fwrite(ctx, chars, strlen(chars), 1);
ap_fputs(ctx->f->next, ctx->bb, "-->");
+ dump_content(ctx);
}
}
static void pendElement(void *ctxt, const xmlChar *uname)
return;
}
- else if ((ctx->cfg->doctype == fpi_html)
- || (ctx->cfg->doctype == fpi_xhtml)) {
+ else if ((ctx->cfg->doctype == fpi_html_legacy)
+ || (ctx->cfg->doctype == fpi_xhtml_legacy)) {
/* enforce html legacy */
if (!desc)
return;
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);
else
cfg->doctype = fpi_html;
}
+ else if (!strcasecmp(t, "html5")) {
+ cfg->etag = html_etag;
+ cfg->doctype = fpi_html5;
+ }
else {
cfg->doctype = apr_pstrdup(cmd->pool, t);
if (l && ((l[0] == 'x') || (l[0] == 'X')))