diff --git a/scheme/httpd/cgi-server.scm b/scheme/httpd/cgi-server.scm index 1ad2161..a4a435a 100644 --- a/scheme/httpd/cgi-server.scm +++ b/scheme/httpd/cgi-server.scm @@ -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))))) - (else - (make-error-response (status-code method-not-allowed) req request-method)))))) + ((string=? request-method "HEAD") + (make-error-response (status-code method-not-allowed) req (list "GET" "POST"))) + + (else + (make-error-response (status-code not-implemented) req)))))) + + (define (split-and-decode-search-spec s)