up
svn: r3946
This commit is contained in:
parent
0cf62c196a
commit
f27bba6bd8
|
@ -78,7 +78,7 @@
|
|||
`("Date: " ,(seconds->gmt-string (current-seconds)))
|
||||
`("Last-Modified: " ,(seconds->gmt-string seconds))
|
||||
`("Server: PLT Scheme")
|
||||
`("Content-type: " ,mime)
|
||||
`("Content-Type: " ,mime)
|
||||
(if (connection-close? conn)
|
||||
(cons `("Connection: close") extras)
|
||||
extras)))
|
||||
|
@ -192,7 +192,7 @@
|
|||
;; output-file: connection path symbol bytes -> void
|
||||
(define (output-file conn file-path method mime-type)
|
||||
(output-headers conn 200 "Okay"
|
||||
`(("Content-length: " ,(file-size file-path)))
|
||||
`(("Content-Length: " ,(file-size file-path)))
|
||||
(file-or-directory-modify-seconds file-path)
|
||||
mime-type)
|
||||
(when (eq? method 'get)
|
||||
|
@ -211,7 +211,7 @@
|
|||
(define (output-response/method conn resp meth)
|
||||
(cond
|
||||
[(eqv? meth 'head)
|
||||
(output-headers/response conn resp `(("Content-length: "
|
||||
(output-headers/response conn resp `(("Content-Length: "
|
||||
,(response/full->size resp))))]
|
||||
[else
|
||||
(output-response conn resp)]))
|
||||
|
@ -235,7 +235,7 @@
|
|||
;; Write a normal response to an output port
|
||||
(define (output-response/basic conn resp size responder)
|
||||
(output-headers/response conn resp
|
||||
`(("Content-length: " ,size)
|
||||
`(("Content-Length: " ,size)
|
||||
. ,(extras->strings resp)))
|
||||
(responder (connection-o-port conn)))
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
(lambda (k-url)
|
||||
`(html (head ,head-attributes
|
||||
(meta ([http-equiv "Pragma"] [content "no-cache"])) ; don't cache in netscape
|
||||
(meta ([http-equiv "expires"] [content "-1"])) ; don't cache in IE
|
||||
(meta ([http-equiv "Expires"] [content "-1"])) ; don't cache in IE
|
||||
; one site said to use -1, another said to use 0.
|
||||
(title . ,title))
|
||||
(body ,body-attributes
|
||||
|
@ -67,7 +67,7 @@
|
|||
(make-response/full (redirection-status-code perm/temp)
|
||||
(redirection-status-message perm/temp)
|
||||
(current-seconds) #"text/html"
|
||||
`((location . ,uri)) (list (redirect-page uri)))))
|
||||
`((Location . ,uri)) (list (redirect-page uri)))))
|
||||
|
||||
; : str -> str
|
||||
(define (redirect-page url)
|
||||
|
|
Loading…
Reference in New Issue
Block a user