HOSTNAME -> HOST-NAME

This commit is contained in:
sperber 2002-08-27 09:05:16 +00:00
parent aeeeea79c1
commit c668e35e05
2 changed files with 7 additions and 7 deletions

View File

@ -50,12 +50,12 @@
(lambda (path req) (predicate path)) handler default-handler)) (lambda (path req) (predicate path)) handler default-handler))
;; selects handler according to host-field of http-request ;; selects handler according to host-field of http-request
(define (make-hostname-handler hostname handler default-handler) (define (make-host-name-handler hostname handler default-handler)
(make-request-handler (make-request-handler
(lambda (path req) (lambda (path req)
;; we expect only one host-header-field ;; we expect only one host-header-field
(string=? hostname (string-trim (get-header (request:headers req) 'host)))) (string=? hostname (string-trim (get-header (request:headers req) 'host))))
handler default-handler)) handler default-handler))
;; selects handler according to path-prefix ;; selects handler according to path-prefix
;; if path-prefix matches, handler is called without the path-prefix ;; if path-prefix matches, handler is called without the path-prefix

View File

@ -367,7 +367,7 @@
(define-interface httpd-basic-handlers-interface (define-interface httpd-basic-handlers-interface
(export make-request-handler (export make-request-handler
make-path-handler make-path-handler
make-hostname-handler make-host-name-handler
make-path-prefix-handler make-path-prefix-handler
alist-path-dispatcher)) alist-path-dispatcher))