simplify
This commit is contained in:
parent
b8431d912f
commit
17b45eb020
|
@ -245,14 +245,14 @@
|
||||||
[content-length . 5]))
|
[content-length . 5]))
|
||||||
#"hello"))
|
#"hello"))
|
||||||
|
|
||||||
(let* ([p (open-input-bytes (bytes-append #"HTTP/1.1 200 OK\r\n"
|
(let ([msg (read-http-msg
|
||||||
#"Transfer-Encoding: chunked\r\n"
|
(open-input-bytes (bytes-append #"HTTP/1.1 200 OK\r\n"
|
||||||
#"\r\n"
|
#"Transfer-Encoding: chunked\r\n"
|
||||||
#"5\r\nhello\r\n"
|
#"\r\n"
|
||||||
#"2\r\n, \r\n"
|
#"5\r\nhello\r\n"
|
||||||
#"6\r\nworld!\r\n"
|
#"2\r\n, \r\n"
|
||||||
#"0\r\n\r\n"))]
|
#"6\r\nworld!\r\n"
|
||||||
[msg (read-http-msg p)])
|
#"0\r\n\r\n")))])
|
||||||
(check-equal? (for/list ([bs (in-http-body-chunks (http-msg-body msg))]) bs)
|
(check-equal? (for/list ([bs (in-http-body-chunks (http-msg-body msg))]) bs)
|
||||||
'(#"hello" #", " #"world!")))
|
'(#"hello" #", " #"world!")))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue