From: Giovanni Bechis Date: Wed, 21 Jan 2026 08:57:27 +0000 (+0000) Subject: add charset in the document if specified in IndexOptions X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ab19469cc43b3dc75e4b041d6a199822655c00f;p=thirdparty%2Fapache%2Fhttpd.git add charset in the document if specified in IndexOptions bz #69930 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1931451 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index df490a9b3b..2230338ea9 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -177,7 +177,11 @@ static void emit_preamble(request_rec *r, int xhtml, const char *title) if (xhtml) { ap_rvputs(r, DOCTYPE_XHTML_1_0T, "\n" - " \n Index of ", title, + " <head>\n", NULL); + if(d->charset != NULL) { + ap_rvputs(r, " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=", d->charset, "\" />\n", NULL); + } + ap_rvputs(r, " <title>Index of ", title, "\n", NULL); } else { ap_rvputs(r, DOCTYPE_HTML_4_01,