Finally fix MAKE-HOST-NAME-HANDLER to the point where it works and has

been tested.
This commit is contained in:
sperber 2003-02-10 12:02:11 +00:00
parent 183cf60bb7
commit 0e7152b68b
2 changed files with 4 additions and 2 deletions

View File

@ -48,7 +48,9 @@
(make-predicate-handler
(lambda (path req)
;; we expect only one host-header-field
(string=? hostname (string-trim (get-header (request-headers req) 'host))))
(let ((body (string-trim (get-header (request-headers req) 'host))))
(or (string-ci=? hostname body)
(string-prefix-ci? (string-append hostname ":") body))))
handler default-handler))
(define (get-header headers tag)

View File

@ -659,7 +659,7 @@
rfc822
httpd-requests ; REQUEST record type, v0.9-request
(subset srfi-1 (fold-right))
(subset srfi-13 (string-trim))
(subset srfi-13 (string-trim string-prefix-ci?))
httpd-responses
httpd-errors
)