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 2013/02/04 23:32:26 UTC
svn commit: r1442409 - in /httpd/httpd/trunk: CHANGES
modules/filters/mod_proxy_html.c
Author: niq
Date: Mon Feb 4 22:32:25 2013
New Revision: 1442409
URL: http://svn.apache.org/viewvc?rev=1442409&view=rev
Log:
mod_proxy_html: bugfixes and introduce HTML5 doctype
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=1442409&r1=1442408&r2=1442409&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Feb 4 22:32:25 2013
@@ -1,6 +1,15 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) 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 [Nick Kew]
+
*) core: Fix valgrind warning about uninitialized memory in argument to
semctl. PR 53690. [Mikhail T. <mi+apache aldan algebra com>]
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=1442409&r1=1442408&r2=1442409&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_proxy_html.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_proxy_html.c Mon Feb 4 22:32:25 2013
@@ -126,6 +126,7 @@ static const char *const fpi_xhtml =
"<!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 */
@@ -309,6 +310,7 @@ static void pcomment(void *ctxt, const x
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)
@@ -323,8 +325,8 @@ static void pendElement(void *ctxt, cons
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;
@@ -1128,6 +1130,10 @@ static const char *set_doctype(cmd_parms
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')))