summaryrefslogtreecommitdiffstatshomepage
path: root/tekuti/request.scm
diff options
context:
space:
mode:
authorGravatar Andreas Rottmann2009-07-02 19:47:30 +0200
committerGravatar Andreas Rottmann2009-07-02 19:47:30 +0200
commiteac799afc38391234acfd0c09c71cbecd1746927 (patch)
tree975c6cd80292a3987ddc06813f980b0280290e38 /tekuti/request.scm
parentd52865f0371f7bffe11f935c97265fc60b8fdf77 (diff)
downloadtekuti-eac799afc38391234acfd0c09c71cbecd1746927.tar.gz
tekuti-eac799afc38391234acfd0c09c71cbecd1746927.zip
Convert the mod-lisp headers to lowercase
HTTP headers are expected to be treated case-insensitively.
Diffstat (limited to 'tekuti/request.scm')
-rw-r--r--tekuti/request.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/tekuti/request.scm b/tekuti/request.scm
index 276691d..08b9adf 100644
--- a/tekuti/request.scm
+++ b/tekuti/request.scm
@@ -118,7 +118,7 @@
;; danger here, regarding the optional alternate clauses...
(define (request-authenticated? request)
(let ((headers (rref request 'headers '())))
- (let ((auth (assoc-ref headers "Authorization")))
+ (let ((auth (assoc-ref headers "authorization")))
(and auth
(match-bind "^Basic ([A-Za-z0-9+/=]*)$" auth (_ b64)
(match-bind "^([^:]*):(.*)$"
@@ -193,7 +193,7 @@
(define (request-server-name request)
(let ((headers (rref request 'headers)))
- (or (assoc-ref headers "Host")
+ (or (assoc-ref headers "host")
(assoc-ref headers "server-ip-addr"))))