Added UPDATING FILE. also fixed a few bugs

This commit is contained in:
int 80h
2020-05-28 16:34:48 -04:00
parent 2f89d8cb9a
commit 014b7c938b
6 changed files with 41 additions and 10 deletions

View File

@@ -66,6 +66,13 @@ pub async fn cgi(
let mut envs = envs(con.peer_addr, srv, &url);
envs.insert("SCRIPT_NAME".to_string(), path.file_name().unwrap().to_str().unwrap().to_string());
match path.parent() {
Some(p) => {
std::env::set_current_dir(p)?;
},
None => {},
}
let cmd = Command::new(path.to_str().unwrap())
.env_clear()
.envs(&envs)