CGI: for PATH_INFO use the path relative to the base directory - geomyidae - a … | |
git clone git://git.codemadness.org/geomyidae | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit c436fc10abe28f4c60a480cad787f619a3724336 | |
parent 9b695d406cbc9c2d9ffddb7a086d44d22f0623ad | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Fri, 7 Apr 2023 12:16:08 +0200 | |
CGI: for PATH_INFO use the path relative to the base directory | |
Signed-off-by: Christoph Lohmann <[email protected]> | |
Diffstat: | |
M handlr.c | 8 ++------ | |
1 file changed, 2 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/handlr.c b/handlr.c | |
@@ -149,9 +149,7 @@ handlecgi(int sock, char *file, char *port, char *base, cha… | |
path = NULL; | |
} | |
- p = strrchr(file, '/'); | |
- if (p == NULL) | |
- p = file; | |
+ p = makebasepath(file, base); | |
if (sear == NULL) | |
sear = ""; | |
@@ -209,9 +207,7 @@ handledcgi(int sock, char *file, char *port, char *base, ch… | |
path = NULL; | |
} | |
- p = strrchr(file, '/'); | |
- if (p == NULL) | |
- p = file; | |
+ p = makebasepath(file, base); | |
if (sear == NULL) | |
sear = ""; |