Fixing problem from Alok Thapa
This commit is contained in:
parent
2bdb9884d3
commit
6b907d6b61
|
@ -50,6 +50,11 @@
|
||||||
=>
|
=>
|
||||||
#"HTTP/1.1 200 Okay\r\nDate: REDACTED GMT\r\nLast-Modified: REDACTED GMT\r\nServer: Racket\r\nContent-Type: text/html; charset=utf-8\r\nConnection: close\r\nhead: value\r\n\r\n<a href=\"#\">link</a>"
|
#"HTTP/1.1 200 Okay\r\nDate: REDACTED GMT\r\nLast-Modified: REDACTED GMT\r\nServer: Racket\r\nContent-Type: text/html; charset=utf-8\r\nConnection: close\r\nhead: value\r\n\r\n<a href=\"#\">link</a>"
|
||||||
|
|
||||||
|
(write-response (response/xexpr '(a ([href "#"]) "link")
|
||||||
|
#:cookies (list (make-cookie "head" "value"))))
|
||||||
|
=>
|
||||||
|
#"HTTP/1.1 200 Okay\r\nDate: REDACTED GMT\r\nLast-Modified: REDACTED GMT\r\nServer: Racket\r\nContent-Type: text/html; charset=utf-8\r\nConnection: close\r\nSet-Cookie: head=value; Version=1\r\n\r\n<a href=\"#\">link</a>"
|
||||||
|
|
||||||
(write-response (response/xexpr '(a ([href "#"]) "link")
|
(write-response (response/xexpr '(a ([href "#"]) "link")
|
||||||
#:preamble #"<<!something XMLy>>"))
|
#:preamble #"<<!something XMLy>>"))
|
||||||
=>
|
=>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
racket/list
|
racket/list
|
||||||
xml
|
xml
|
||||||
web-server/private/xexpr
|
web-server/private/xexpr
|
||||||
|
net/cookie
|
||||||
"request-structs.rkt"
|
"request-structs.rkt"
|
||||||
"cookie.rkt"
|
"cookie.rkt"
|
||||||
"response-structs.rkt")
|
"response-structs.rkt")
|
||||||
|
@ -27,5 +28,5 @@
|
||||||
(provide/contract
|
(provide/contract
|
||||||
[response/xexpr
|
[response/xexpr
|
||||||
((pretty-xexpr/c)
|
((pretty-xexpr/c)
|
||||||
(#:code number? #:message bytes? #:seconds number? #:mime-type bytes? #:headers (listof header?) #:preamble bytes?)
|
(#:code number? #:message bytes? #:seconds number? #:mime-type bytes? #:cookies (listof cookie?) #:headers (listof header?) #:preamble bytes?)
|
||||||
. ->* . response?)])
|
. ->* . response?)])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user