Finally fix MAKE-HOST-NAME-HANDLER to the point where it works and has
been tested.
This commit is contained in:
parent
183cf60bb7
commit
0e7152b68b
|
@ -48,7 +48,9 @@
|
||||||
(make-predicate-handler
|
(make-predicate-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))))
|
(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))
|
handler default-handler))
|
||||||
|
|
||||||
(define (get-header headers tag)
|
(define (get-header headers tag)
|
||||||
|
|
|
@ -659,7 +659,7 @@
|
||||||
rfc822
|
rfc822
|
||||||
httpd-requests ; REQUEST record type, v0.9-request
|
httpd-requests ; REQUEST record type, v0.9-request
|
||||||
(subset srfi-1 (fold-right))
|
(subset srfi-1 (fold-right))
|
||||||
(subset srfi-13 (string-trim))
|
(subset srfi-13 (string-trim string-prefix-ci?))
|
||||||
httpd-responses
|
httpd-responses
|
||||||
httpd-errors
|
httpd-errors
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue