--- mod_autoindex.c 2007-08-30 00:37:26.000000000 +0200
+++ mod_autoindex.c 2007-10-18 16:25:41.000000000 +0200
@@ -160,9 +160,18 @@
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);