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))
;; selects handler according to host-field of http-request
(define (make-hostname-handler hostname handler default-handler)
(make-request-handler
(lambda (path req)
;; we expect only one host-header-field
(string=? hostname (string-trim (get-header (request:headers req) 'host))))
handler default-handler))
(define (make-host-name-handler hostname handler default-handler)
(make-request-handler
(lambda (path req)
;; we expect only one host-header-field
(string=? hostname (string-trim (get-header (request:headers req) 'host))))
handler default-handler))
;; selects handler according to 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
(export make-request-handler
make-path-handler
make-hostname-handler
make-host-name-handler
make-path-prefix-handler
alist-path-dispatcher))