about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2020-12-28 21:05:45 +0100
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2020-12-28 21:05:45 +0100
commit700978231e214e504db9577ac9cc18ab0f8a333d (patch)
tree637375fd9e73bae577cc9fc6e363d7d2658cf81c
parentba300906321a4fa8d01dc1f335c0d6d5c7cae602 (diff)
fix(main): set PATH_INFO=/ for index HEAD master
We assume that SCRIPT_NAME does not end in a slash or is empty and thus
PATH_INFO _must_ start with a slash.
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index dfebbda..25d306b 100644
--- a/main.c
+++ b/main.c
@@ -165,7 +165,7 @@ int main(void) {
         page_type = PAGE_TYPE_ERROR;
     } else if(path_info == NULL || path_info[0] == '\0' || strcmp(path_info, "/") == 0) {
         // make sure clean URLs are generated
-        setenv("PATH_INFO", "", 1);
+        setenv("PATH_INFO", "/", 1);
 
         page_type = PAGE_TYPE_INDEX;
     } else if(strcmp(path_info, "/rss.xml") == 0) {