summaryrefslogtreecommitdiffstats
path: root/cgi.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cgi.c b/cgi.c
index c622d9ec..9e072116 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1037,9 +1037,10 @@ main(void)
else if (*path == '/')
path++;
- if (*path != '\0' && access(path, F_OK) == -1) {
+ if (*path != '\0') {
path_parse(&req, path);
- path = "";
+ if (access(path, F_OK) == -1)
+ path = "";
} else if ((querystring = getenv("QUERY_STRING")) != NULL)
http_parse(&req, querystring);