look if file is executable
This commit is contained in:
parent
9bfb77b2d5
commit
f94396a54e
|
@ -128,7 +128,15 @@
|
|||
(format #f "Could not execute CGI script ~a."
|
||||
filename))
|
||||
stat)) ;; FIXME! must return http-response object!
|
||||
(cgi-make-response (run/port* doit) req)))
|
||||
(case (file-not-executable? filename)
|
||||
((search-denied permission)
|
||||
(make-http-error-response http-status/forbidden req
|
||||
"Permission denied."))
|
||||
((no-directory nonexistent)
|
||||
(make-http-error-response http-status/not-found req
|
||||
"File or directory doesn't exist."))
|
||||
(else
|
||||
(cgi-make-response (run/port* doit) req)))))
|
||||
|
||||
(else (make-http-error-response http-status/method-not-allowed req))))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue