X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fcallcgi.c;h=fb2596bff6c6b4825afa5c08f42f5563e3a3719e;hb=33f29d6778ddc733a054e07d0d255f63a77797ac;hp=10bb87c9af47e6223dc35fd237a40fad51d2d98b;hpb=f0a758cc8c1337606a392db67e63cec6601d2730;p=ashd.git diff --git a/src/callcgi.c b/src/callcgi.c index 10bb87c..fb2596b 100644 --- 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. */