Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee036f7
)
callcgi: Fixed PATH_INFO bug.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Tue, 31 Aug 2010 22:20:28 +0000
(
00:20
+0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Tue, 31 Aug 2010 22:20:28 +0000
(
00:20
+0200)
src/callcgi.c
patch
|
blob
|
blame
|
history
diff --git
a/src/callcgi.c
b/src/callcgi.c
index
10bb87c
..
fb2596b
100644
(file)
--- a/
src/callcgi.c
+++ b/
src/callcgi.c
@@
-90,7
+90,10
@@
static void forkchild(int inpath, char *prog, char *file, char *method, char *ur
if(getenv("HTTP_VERSION"))
putenv(sprintf2("SERVER_PROTOCOL=%s", getenv("HTTP_VERSION")));
putenv(sprintf2("REQUEST_METHOD=%s", method));
- putenv(sprintf2("PATH_INFO=/%s", rest));
+ if(*rest)
+ putenv(sprintf2("PATH_INFO=/%s", rest));
+ else
+ putenv("PATH_INFO=");
name = url;
/* XXX: This is an ugly hack (I think), but though I can think
* of several alternatives, none seem to be better. */