From: Jim Jagielski Date: Tue, 20 Nov 2007 14:01:28 +0000 (+0000) Subject: Merge r593816 from trunk: X-Git-Tag: 2.2.7~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebd577fe7223f9b7d6d91f82ed4b8419525dd215;p=thirdparty%2Fapache%2Fhttpd.git Merge r593816 from trunk: * Generate valid XHTML output by adding the xhtml namespace. PR: 43649 Submitted by: Jose Kahan Reviewed by: rpluem Submitted by: rpluem Reviewed by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@596675 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index c09c827154b..e326de046ca 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.7 + *) mod_autoindex: Generate valid XHTML output by adding the xhtml + namespace. PR 43649 [Jose Kahan ] + *) mod_ldap: Give callers a reference to data copied into the request pool instead of references directly into the cache PR 43786 [Eric Covener] diff --git a/STATUS b/STATUS index 677d258c5af..903b2c1330f 100644 --- a/STATUS +++ b/STATUS @@ -109,13 +109,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: niq says: done jim: +1 - * mod_autoindex: Generate valid XHTML output by adding the xhtml namespace. - Trunk version of patch: - http://svn.apache.org/viewcvs.cgi?rev=593816&view=rev - Backport version for 2.2.x of patch: - Trunk version of patch works - +1: rpluem, trawick, jim - * core: Avoid some unexpected connection closes by telling the client that the connection is not persistent if the MPM process handling the request is already exiting when the response header is built. diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 8d514021a5b..306208ddebc 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -160,9 +160,18 @@ static void emit_preamble(request_rec *r, int xhtml, const char *title) d = (autoindex_config_rec *) ap_get_module_config(r->per_dir_config, &autoindex_module); - ap_rvputs(r, xhtml ? DOCTYPE_XHTML_1_0T : DOCTYPE_HTML_3_2, - "\n \n Index of ", title, - "\n", NULL); + if (xhtml) { + ap_rvputs(r, DOCTYPE_XHTML_1_0T, + "\n" + "\n Index of ", title, + "\n", NULL); + } else { + ap_rvputs(r, DOCTYPE_HTML_3_2, + "\n \n" + "Index of ", title, + "\n", NULL); + } + if (d->style_sheet != NULL) { ap_rvputs(r, " style_sheet, "\" type=\"text/css\"", xhtml ? " />\n" : ">\n", NULL);