Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lifeofguenter/cb6351595392e4df34f7 to your computer and use it in GitHub Desktop.
Save lifeofguenter/cb6351595392e4df34f7 to your computer and use it in GitHub Desktop.
Lighttpd 1.4.35 mod_dirlisting .txt -> .html README/HEADER
--- a/src/mod_dirlisting.c 2014-08-19 10:13:09.000000000 +0200
+++ b/src/mod_dirlisting.c 2014-08-19 10:13:50.000000000 +0200
@@ -534,14 +534,14 @@
buffer_append_string_len(out, CONST_STR_LEN("</head>\n<body>\n"));
}
- /* HEADER.txt */
+ /* HEADER.html */
if (p->conf.show_header) {
stream s;
/* if we have a HEADER file, display it in <pre class="header"></pre> */
buffer_copy_string_buffer(p->tmp_buf, con->physical.path);
BUFFER_APPEND_SLASH(p->tmp_buf);
- buffer_append_string_len(p->tmp_buf, CONST_STR_LEN("HEADER.txt"));
+ buffer_append_string_len(p->tmp_buf, CONST_STR_LEN("HEADER.html"));
if (-1 != stream_open(&s, p->tmp_buf)) {
if (p->conf.encode_header) {
@@ -594,7 +594,7 @@
buffer_copy_string_buffer(p->tmp_buf, con->physical.path);
BUFFER_APPEND_SLASH(p->tmp_buf);
- buffer_append_string_len(p->tmp_buf, CONST_STR_LEN("README.txt"));
+ buffer_append_string_len(p->tmp_buf, CONST_STR_LEN("README.html"));
if (-1 != stream_open(&s, p->tmp_buf)) {
if (p->conf.encode_readme) {
@@ -706,11 +706,11 @@
}
if (p->conf.hide_readme_file) {
- if (strcmp(dent->d_name, "README.txt") == 0)
+ if (strcmp(dent->d_name, "README.html") == 0)
continue;
}
if (p->conf.hide_header_file) {
- if (strcmp(dent->d_name, "HEADER.txt") == 0)
+ if (strcmp(dent->d_name, "HEADER.html") == 0)
continue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment