-adapt calls of make-error-response

-answer 501, not 405, for unimplemented/unrecognized methods
This commit is contained in:
vibr 2004-08-11 12:28:46 +00:00
parent 1c4445933d
commit 8b09f2b338
1 changed files with 9 additions and 5 deletions

View File

@ -124,17 +124,21 @@
(case (file-not-executable? filename)
((search-denied permission)
(make-error-response (status-code forbidden) req
"Permission denied."))
"No permission to search directory."))
((no-directory nonexistent)
(make-error-response (status-code not-found) req
"File or directory doesn't exist."))
(make-error-response (status-code not-found) req))
(else
(if nph?
(cgi-make-nph-response (run/port* doit))
(cgi-make-response (run/port* doit) path req)))))
((string=? request-method "HEAD")
(make-error-response (status-code method-not-allowed) req (list "GET" "POST")))
(else
(make-error-response (status-code method-not-allowed) req request-method))))))
(make-error-response (status-code not-implemented) req))))))
(define (split-and-decode-search-spec s)