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. */
if(getenv("REQ_X_ASH_SERVER_PORT"))
putenv(sprintf2("SERVER_PORT=%s", getenv("REQ_X_ASH_SERVER_PORT")));
if(getenv("REQ_X_ASH_PROTOCOL") && !strcmp(getenv("REQ_X_ASH_PROTOCOL"), "https"))
- putenv("HTTPS=ON");
+ putenv("HTTPS=on");
if(getenv("REQ_X_ASH_ADDRESS"))
putenv(sprintf2("REMOTE_ADDR=%s", getenv("REQ_X_ASH_ADDRESS")));
if(getenv("REQ_CONTENT_TYPE"))