Changeset 4157 in project


Ignore:
Timestamp:
05/12/07 17:30:51 (13 years ago)
Author:
sjamaan
Message:

Make headers case-insensitive

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spiffy/spiffy-base.scm

    r4150 r4157  
    292292                                         [current-request req]
    293293                                         [current-response-code '(200 . "OK")]
    294                                          [current-response-headers (list (cons "content-type" "text/html"))]
     294                                         [current-response-headers (list (cons "Content-Type" "text/html"))]
    295295                                         [current-workdir (pathname-directory fn)])
    296296                                        ((alist-ref ext spiffy-file-ext-handlers string=? unknown-handler) fn)) ) ] )
     
    334334                   (printf "<i>~A at ~A, port ~A</i></body></html>"
    335335                           spiffy-server-name (get-host-name) spiffy-tcp-port) ) ) ) ] )
    336     (printf "Content-type: text/html\r\nContent-length: ~a\r\n\r\n~a"
     336    (printf "Content-Type: text/html\r\nContent-length: ~a\r\n\r\n~a"
    337337            (string-length str) str) ) )
    338338
     
    505505
    506506(define (single-header? name)
    507   (member name '("Set-Cookie")))
     507  (member name '("Set-Cookie") string-ci=?))
    508508
    509509(define (set-header! header)
     
    545545      (write-response-header
    546546       request code description
    547        (alist-cons "Content-type" type (alist-cons "Content-length" (string-length text) headers)) )
     547       (alist-cons "Content-Type" type (alist-cons "Content-Length" (string-length text) headers)) )
    548548      (display "\r\n")
    549549      (display text)
Note: See TracChangeset for help on using the changeset viewer.