diff --git a/tekuti/mod-lisp.scm b/tekuti/mod-lisp.scm index 458f2bc..f209756 100644 --- a/tekuti/mod-lisp.scm +++ b/tekuti/mod-lisp.scm @@ -45,7 +45,8 @@ (let ((k (read-line*))) (if (string=? k "end") (reverse (map cons keys values)) - (lp (cons k keys) (cons (read-line*) values)))))) + (lp (cons (string-downcase k) keys) + (cons (read-line*) values)))))) (define (read-chars nchars port) (let ((buf (make-string nchars))) diff --git a/tekuti/page.scm b/tekuti/page.scm index 8330bf9..c9fcf7c 100644 --- a/tekuti/page.scm +++ b/tekuti/page.scm @@ -308,7 +308,7 @@ (server-name (request-server-name request))) (cond ((let ((since (assoc-ref (rref request 'headers '()) - "If-Modified-Since"))) + "if-modified-since"))) (and since (>= (rfc822-date->timestamp since) last-modified))) (rcons* request 'status 304 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"))))