Project

General

Profile

Actions

Feature #250

closed

Proposal to allow absolute name of index-file, making it possible to have single index file for all subfolders

Added by Anonymous over 19 years ago. Updated over 17 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:

Description

Using that another web server it's possible to use, for example, /browser.php as index file and it would invoke that single script instance for every subfolder's index file.

#4.3 patch follows. It's really simple and it looks like it would not break anything.


diff -rU2 lighttpd-1.4.3/src/mod_indexfile.c lighttpd-1.4.3-my/src/mod_indexfile.c
--- lighttpd-1.4.3/src/mod_indexfile.c  2005-08-13 18:42:23.000000000 +0200
+++ lighttpd-1.4.3-my/src/mod_indexfile.c       2005-09-04 14:07:23.000000000 +0200
@@ -155,5 +155,8 @@
                data_string *ds = (data_string *)p->conf.indexfiles->data[k];

-               buffer_copy_string_buffer(p->tmp_buf, con->physical.path);
+               if (ds->value[0] == '/')
+                       buffer_copy_string_buffer(p->tmp_buf, con->physical.doc_root);
+               else
+                       buffer_copy_string_buffer(p->tmp_buf, con->physical.path);
                buffer_append_string_buffer(p->tmp_buf, ds->value);

-- dragisha

Actions #1

Updated by jan over 19 years ago

  • Status changed from New to Assigned

fixed patch

Actions #2

Updated by Anonymous over 19 years ago

Mea culpa, correct patch would be:


#!c
diff -rU2 lighttpd-1.4.3/src/mod_indexfile.c lighttpd-1.4.3-my/src/mod_indexfile.c
--- lighttpd-1.4.3/src/mod_indexfile.c  2005-08-13 18:42:23.000000000 +0200
+++ lighttpd-1.4.3-my/src/mod_indexfile.c       2005-09-04 14:07:23.000000000 +0200
@@ -155,5 +155,8 @@
                data_string *ds = (data_string *)p->conf.indexfiles->data[k];

-               buffer_copy_string_buffer(p->tmp_buf, con->physical.path);
+               if (ds->value->ptr[0] == '/')
+                       buffer_copy_string_buffer(p->tmp_buf, con->physical.doc_root);
+               else
+                       buffer_copy_string_buffer(p->tmp_buf, con->physical.path);
                buffer_append_string_buffer(p->tmp_buf, ds->value);

-- dragisha

Actions #3

Updated by jan about 19 years ago

  • Status changed from Assigned to Fixed
  • Resolution set to fixed

fixed in r762

Actions

Also available in: Atom