From: Ruediger Pluem Date: Sat, 10 Nov 2007 22:15:34 +0000 (+0000) Subject: * Generate valid XHTML output by adding the xhtml namespace. X-Git-Tag: 2.3.0~1278 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15d1cc4ad87bd48710dfba9c2c7d302ffee2248e;p=apache * Generate valid XHTML output by adding the xhtml namespace. PR: 43649 Submitted by: Jose Kahan Reviewed by: rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@593816 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index ad7ebb4dc7..93973866dc 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.3.0 [ When backported to 2.2.x, remove entry from this file ] + *) mod_autoindex: Generate valid XHTML output by adding the xhtml + namespace. PR 43649 [Jose Kahan ] + *) core: Add the option to keep aside a request body up to a certain size that would otherwise be discarded, to be consumed by filters such as mod_include. When enabled for a directory, POST requests diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 8d514021a5..306208ddeb 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);