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