diff options
author | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2020-09-19 11:40:30 +0200 |
---|---|---|
committer | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2020-09-19 11:40:30 +0200 |
commit | b7b9f617b55e0098e9014ffbbde0de0ff8cb324a (patch) | |
tree | 0860ee4d4f252318c7d6819b40366fbdac7d70d7 /main.c | |
parent | 79776dc45429f1c724b9037f18ebc172058fc734 (diff) |
fix(main): correct routing sanity check
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c index e6689d5..dfebbda 100644 --- a/main.c +++ b/main.c @@ -216,10 +216,14 @@ int main(void) { data.page_type = page_type; data.status = status; data.script_name = script_name; - data.path_info = path_info; + if(path_info == NULL) { + data.path_info = ""; + } else { + 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 || + assert(data.page_type == PAGE_TYPE_ERROR || (data.path_info != NULL && data.script_name != NULL)); // make sure that PAGE_TYPE_ENTRY will have an entry set in template_header |