From 700978231e214e504db9577ac9cc18ab0f8a333d Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 28 Dec 2020 21:05:45 +0100 Subject: fix(main): set PATH_INFO=/ for index We assume that SCRIPT_NAME does not end in a slash or is empty and thus PATH_INFO _must_ start with a slash. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit 1.4.1