]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
add charset in the document if specified in IndexOptions
authorGiovanni Bechis <gbechis@apache.org>
Wed, 21 Jan 2026 08:57:27 +0000 (08:57 +0000)
committerGiovanni Bechis <gbechis@apache.org>
Wed, 21 Jan 2026 08:57:27 +0000 (08:57 +0000)
bz #69930

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1931451 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_autoindex.c

index df490a9b3be22f3d763c859a845a272bd77f3eaa..2230338ea96021606f8c13e3503729c9b5f9ecb4 100644 (file)
@@ -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,
                   "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
-                  " <head>\n  <title>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,
                   "</title>\n", NULL);
     } else {
         ap_rvputs(r, DOCTYPE_HTML_4_01,