Handler permission denied CGI error and serv as static
This commit is contained in:
parent
01e0687594
commit
930dc6380f
|
@ -81,6 +81,10 @@ func handleCGI(conf *Config, req *Request, cgiPath string) (ok bool) {
|
|||
}
|
||||
if err != nil {
|
||||
log.Println("Error running CGI program " + path + ": " + err.Error())
|
||||
if strings.Contains(err.Error(), "permission denied") {
|
||||
ok = false
|
||||
return
|
||||
}
|
||||
if err, ok := err.(*exec.ExitError); ok {
|
||||
log.Println("↳ stderr output: " + string(err.Stderr))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue