look if file is executable

This commit is contained in:
interp 2002-08-29 14:53:44 +00:00
parent 9bfb77b2d5
commit f94396a54e
1 changed files with 9 additions and 1 deletions

View File

@ -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))))))