HOSTNAME -> HOST-NAME
This commit is contained in:
parent
aeeeea79c1
commit
c668e35e05
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in New Issue