Fixed bugs in cgi-everywhere
This commit is contained in:
10
src/main.rs
10
src/main.rs
@@ -244,10 +244,6 @@ async fn handle_connection(
|
||||
con.send_status(Status::CGIError, None).await?;
|
||||
return Ok(());
|
||||
}
|
||||
} else {
|
||||
logger::logger(con.peer_addr, Status::CGIError, &request);
|
||||
con.send_status(Status::CGIError, None).await?;
|
||||
return Ok(());
|
||||
}
|
||||
},
|
||||
None => {
|
||||
@@ -259,6 +255,12 @@ async fn handle_connection(
|
||||
}
|
||||
}
|
||||
|
||||
if perm.mode() & 0o0111 == 0o0111 {
|
||||
logger::logger(con.peer_addr, Status::NotFound, &request);
|
||||
con.send_status(Status::NotFound, None).await?;
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if perm.mode() & 0o0444 != 0o0444 {
|
||||
logger::logger(con.peer_addr, Status::NotFound, &request);
|
||||
con.send_status(Status::NotFound, None).await?;
|
||||
|
||||
Reference in New Issue
Block a user