From 4efff467c91fcd2e8a4a6a4d32eed16dbdc775db Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 7 Jun 2021 00:36:55 +0200 Subject: refactor(main): remove unreachable PATH_INFO cleanup We set PATH_INFO to "/" now if it is `null` or empty, so the conditional would never be reached. Also it would do precisely what we don't want these days. --- main.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/main.c b/main.c index 0aec826..4f762c9 100644 --- a/main.c +++ b/main.c @@ -181,11 +181,7 @@ int main(void) { data.page_type = page_type; data.status = error_http_status(status); data.script_name = script_name; - if(path_info == NULL) { - data.path_info = ""; - } else { - data.path_info = path_info; - } + data.path_info = path_info; // confirm that we have SCRIPT_NAME and PATH_INFO unless an error occurred assert(data.page_type == PAGE_TYPE_ERROR || -- cgit 1.4.1