Vodz, last_patch_104

This commit is contained in:
Glenn L McGrath
2003-09-10 23:35:45 +00:00
parent 87af49f26b
commit fe538ba5d6
2 changed files with 18 additions and 5 deletions

View File

@ -1172,7 +1172,6 @@ static int sendCgi(const char *url,
*script = '/'; /* is directory, find next '/' */
}
addEnv("PATH", "INFO", script); /* set /PATH_INFO or NULL */
addEnv("PATH", "", getenv("PATH"));
addEnv("REQUEST", "METHOD", request);
if(urlArgs) {
char *uri = alloca(strlen(purl) + 2 + strlen(urlArgs));
@ -1996,6 +1995,19 @@ int httpd_main(int argc, char *argv[])
# endif
#endif
#ifdef CONFIG_FEATURE_HTTPD_CGI
{
char *p = getenv("PATH");
if(p)
p = bb_xstrdup(p);
clearenv();
if(p) {
setenv("PATH", p, 0);
}
}
#endif
#ifdef CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP
sighup_handler(0);
#else