File: debian-bug-1125778.patch

package info (click to toggle)
apache2 2.4.66-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 59,500 kB
  • sloc: ansic: 212,331; python: 13,830; perl: 11,307; sh: 7,258; php: 1,320; javascript: 1,314; awk: 749; makefile: 715; lex: 374; yacc: 161; xml: 2
file content (29 lines) | stat: -rw-r--r-- 1,313 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: Giovanni Bechis <gbechis@apache.org>
Date: Wed, 21 Jan 2026 08:57:27 +0000
Subject: 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

origin: https://github.com/apache/httpd/commit/6ab19469cc43b3dc75e4b041d6a199822655c00f
bug-debian: https://bugs.debian.org/1125778
---
 modules/generators/mod_autoindex.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c
index 715b49c..f40bdfc 100644
--- a/modules/generators/mod_autoindex.c
+++ b/modules/generators/mod_autoindex.c
@@ -176,7 +176,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,