This commit is contained in:
Milo Turner 2020-04-10 21:15:16 -04:00
parent b8431d912f
commit 17b45eb020
1 changed files with 8 additions and 8 deletions

View File

@ -245,14 +245,14 @@
[content-length . 5]))
#"hello"))
(let* ([p (open-input-bytes (bytes-append #"HTTP/1.1 200 OK\r\n"
#"Transfer-Encoding: chunked\r\n"
#"\r\n"
#"5\r\nhello\r\n"
#"2\r\n, \r\n"
#"6\r\nworld!\r\n"
#"0\r\n\r\n"))]
[msg (read-http-msg p)])
(let ([msg (read-http-msg
(open-input-bytes (bytes-append #"HTTP/1.1 200 OK\r\n"
#"Transfer-Encoding: chunked\r\n"
#"\r\n"
#"5\r\nhello\r\n"
#"2\r\n, \r\n"
#"6\r\nworld!\r\n"
#"0\r\n\r\n")))])
(check-equal? (for/list ([bs (in-http-body-chunks (http-msg-body msg))]) bs)
'(#"hello" #", " #"world!")))