about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-06-07 00:36:55 +0200
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-06-07 00:36:55 +0200
commit4efff467c91fcd2e8a4a6a4d32eed16dbdc775db (patch)
treedbac5d258883deda5014fb7243459b6602b32886
parent0ba9f89610a55f2cec6617f3b8864a7b94df886e (diff)
refactor(main): remove unreachable PATH_INFO cleanup depot
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.
-rw-r--r--main.c6
1 files changed, 1 insertions, 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 ||