From 3b6b813965c8e9183231dc542a8a1872e547ecb2 Mon Sep 17 00:00:00 2001 From: sperber Date: Tue, 27 Aug 2002 09:42:02 +0000 Subject: [PATCH] Move NULL-PATH-HANDLER from HTTPD-FILE-DIRECTORY-HANDLERS-INTERFACE to HTTPD-BASIC-HANDLERS. --- scheme/httpd/file-dir-handler.scm | 6 ------ scheme/httpd/handlers.scm | 6 ++++++ scheme/packages.scm | 7 ++++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/scheme/httpd/file-dir-handler.scm b/scheme/httpd/file-dir-handler.scm index fb2a3ed..fa1e09e 100644 --- a/scheme/httpd/file-dir-handler.scm +++ b/scheme/httpd/file-dir-handler.scm @@ -79,12 +79,6 @@ req))) -;;; The null path handler -- handles nothing, sends back an error response. -;;; Can be useful as the default in table-driven path handlers. - -(define (null-path-handler path req) - (make-http-error-response http-status/not-found req)) - ;;;; Support procs for the path handlers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/scheme/httpd/handlers.scm b/scheme/httpd/handlers.scm index 6ab4bf2..c539fd1 100644 --- a/scheme/httpd/handlers.scm +++ b/scheme/httpd/handlers.scm @@ -86,3 +86,9 @@ default-handler)) default-handler handler-alist)) + +;;; The null path handler -- handles nothing, sends back an error response. +;;; Can be useful as the default in table-driven path handlers. + +(define (null-path-handler path req) + (make-http-error-response http-status/not-found req)) diff --git a/scheme/packages.scm b/scheme/packages.scm index 54e380f..27b0a06 100644 --- a/scheme/packages.scm +++ b/scheme/packages.scm @@ -370,14 +370,14 @@ make-path-handler make-host-name-handler make-path-prefix-handler - alist-path-dispatcher)) + alist-path-dispatcher + null-path-handler)) (define-interface httpd-file-directory-handlers-interface (export home-dir-handler tilde-home-dir-handler rooted-file-handler - rooted-file-or-directory-handler - null-path-handler)) + rooted-file-or-directory-handler)) (define-interface seval-handler-interface (export seval-handler)) @@ -768,6 +768,7 @@ httpd-request ; REQUEST record type, v0.9-request srfi-1 ; FOLD-RIGHT srfi-13 ; STRING-TRIM + httpd-responses ) (files (httpd handlers)))