diff --git a/scheme/httpd/handlers.scm b/scheme/httpd/handlers.scm index e8b62cc..6ab4bf2 100644 --- a/scheme/httpd/handlers.scm +++ b/scheme/httpd/handlers.scm @@ -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 diff --git a/scheme/packages.scm b/scheme/packages.scm index da81283..764a269 100644 --- a/scheme/packages.scm +++ b/scheme/packages.scm @@ -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))