parent
8eae769bd1
commit
6f1faa8e8f
|
@ -42,7 +42,7 @@
|
||||||
(define-values (status headers content-port)
|
(define-values (status headers content-port)
|
||||||
e)
|
e)
|
||||||
(thread-wait lt)
|
(thread-wait lt)
|
||||||
(check-equal? req ereq)
|
(check-equal? (regexp-replace* (number->string the-port) req "REDACTED") ereq)
|
||||||
(check-equal? status estatus)
|
(check-equal? status estatus)
|
||||||
(check-equal? headers eheaders)
|
(check-equal? headers eheaders)
|
||||||
(check-equal? (port->bytes content-port) econtent)))
|
(check-equal? (port->bytes content-port) econtent)))
|
||||||
|
@ -67,92 +67,92 @@
|
||||||
|
|
||||||
(tests
|
(tests
|
||||||
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n24\r\nThis is the data in the first chunk \r\n1A\r\nand this is the second one\r\n0\r\n"
|
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n24\r\nThis is the data in the first chunk \r\n1A\r\nand this is the second one\r\n0\r\n"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.1 200 OK"
|
#"HTTP/1.1 200 OK"
|
||||||
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked")
|
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked")
|
||||||
#"This is the data in the first chunk and this is the second one"]
|
#"This is the data in the first chunk and this is the second one"]
|
||||||
|
|
||||||
["HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\n\r\nThis is the data in the first chunk and this is the second one"
|
["HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\n\r\nThis is the data in the first chunk and this is the second one"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.0 200 OK"
|
#"HTTP/1.0 200 OK"
|
||||||
'(#"Content-Type: text/plain")
|
'(#"Content-Type: text/plain")
|
||||||
#"This is the data in the first chunk and this is the second one"]
|
#"This is the data in the first chunk and this is the second one"]
|
||||||
|
|
||||||
["HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 62\r\n\r\nThis is the data in the first chunk and this is the second one"
|
["HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 62\r\n\r\nThis is the data in the first chunk and this is the second one"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.0 200 OK"
|
#"HTTP/1.0 200 OK"
|
||||||
'(#"Content-Type: text/plain" #"Content-Length: 62")
|
'(#"Content-Type: text/plain" #"Content-Length: 62")
|
||||||
#"This is the data in the first chunk and this is the second one"]
|
#"This is the data in the first chunk and this is the second one"]
|
||||||
|
|
||||||
["HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\ncontent-length: 62\r\n\r\nThis is the data in the first chunk and this is the second one"
|
["HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\ncontent-length: 62\r\n\r\nThis is the data in the first chunk and this is the second one"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.0 200 OK"
|
#"HTTP/1.0 200 OK"
|
||||||
'(#"Content-Type: text/plain" #"content-length: 62")
|
'(#"Content-Type: text/plain" #"content-length: 62")
|
||||||
#"This is the data in the first chunk and this is the second one"]
|
#"This is the data in the first chunk and this is the second one"]
|
||||||
|
|
||||||
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n20\r\nThis is the data in the first ch\r\n21\r\nand this is the second oneXXXXXXX\r\n0\r\n"
|
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n20\r\nThis is the data in the first ch\r\n21\r\nand this is the second oneXXXXXXX\r\n0\r\n"
|
||||||
|
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.1 200 OK"
|
#"HTTP/1.1 200 OK"
|
||||||
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked")
|
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked")
|
||||||
#"This is the data in the first chand this is the second oneXXXXXXX"]
|
#"This is the data in the first chand this is the second oneXXXXXXX"]
|
||||||
|
|
||||||
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n24\r\nThis is the data in the first chunk \r\n1A\r\nand this is the second one\r\n0\r\n"
|
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n24\r\nThis is the data in the first chunk \r\n1A\r\nand this is the second one\r\n0\r\n"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.1 200 OK"
|
#"HTTP/1.1 200 OK"
|
||||||
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked")
|
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked")
|
||||||
#"This is the data in the first chunk and this is the second one"]
|
#"This is the data in the first chunk and this is the second one"]
|
||||||
|
|
||||||
["HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\n\r\nThis is the data in the first chunk and this is the second one"
|
["HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\n\r\nThis is the data in the first chunk and this is the second one"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.0 200 OK"
|
#"HTTP/1.0 200 OK"
|
||||||
'(#"Content-Type: text/plain")
|
'(#"Content-Type: text/plain")
|
||||||
#"This is the data in the first chunk and this is the second one"]
|
#"This is the data in the first chunk and this is the second one"]
|
||||||
|
|
||||||
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n20\r\nThis is the data in the first ch\r\n21\r\nand this is the second oneXXXXXXX\r\n0\r\n"
|
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n20\r\nThis is the data in the first ch\r\n21\r\nand this is the second oneXXXXXXX\r\n0\r\n"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.1 200 OK"
|
#"HTTP/1.1 200 OK"
|
||||||
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked")
|
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked")
|
||||||
#"This is the data in the first chand this is the second oneXXXXXXX"]
|
#"This is the data in the first chand this is the second oneXXXXXXX"]
|
||||||
|
|
||||||
["HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\n\r\nThis is the data in the first chunk and this is the second one\r\n"
|
["HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\n\r\nThis is the data in the first chunk and this is the second one\r\n"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.0 200 OK"
|
#"HTTP/1.0 200 OK"
|
||||||
'(#"Content-Type: text/plain")
|
'(#"Content-Type: text/plain")
|
||||||
#"This is the data in the first chunk and this is the second one\r\n"]
|
#"This is the data in the first chunk and this is the second one\r\n"]
|
||||||
|
|
||||||
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n24\r\nThis is the data in the first chunk \r\n1A\r\nand this is the second one\r\n0\r\n"
|
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n24\r\nThis is the data in the first chunk \r\n1A\r\nand this is the second one\r\n0\r\n"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.1 200 OK"
|
#"HTTP/1.1 200 OK"
|
||||||
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked")
|
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked")
|
||||||
#"This is the data in the first chunk and this is the second one"]
|
#"This is the data in the first chunk and this is the second one"]
|
||||||
|
|
||||||
["HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\n\r\nThis is the data in the first chunk and this is the second one"
|
["HTTP/1.0 200 OK\r\nContent-Type: text/plain\r\n\r\nThis is the data in the first chunk and this is the second one"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.0 200 OK"
|
#"HTTP/1.0 200 OK"
|
||||||
'(#"Content-Type: text/plain")
|
'(#"Content-Type: text/plain")
|
||||||
#"This is the data in the first chunk and this is the second one"]
|
#"This is the data in the first chunk and this is the second one"]
|
||||||
|
|
||||||
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n20\r\nThis is the data in the first ch\r\n21\r\nand this is the second oneXXXXXXX\r\n0\r\n"
|
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\n\r\n20\r\nThis is the data in the first ch\r\n21\r\nand this is the second oneXXXXXXX\r\n0\r\n"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.1 200 OK"
|
#"HTTP/1.1 200 OK"
|
||||||
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked")
|
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked")
|
||||||
#"This is the data in the first chand this is the second oneXXXXXXX"]
|
#"This is the data in the first chand this is the second oneXXXXXXX"]
|
||||||
|
|
||||||
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\nAnother-Header: ta-daa\r\n\r\n20\r\nThis is the data in the first ch\r\n21\r\nand this is the second oneXXXXXXX\r\n0\r\n"
|
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\nAnother-Header: ta-daa\r\n\r\n20\r\nThis is the data in the first ch\r\n21\r\nand this is the second oneXXXXXXX\r\n0\r\n"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.1 200 OK"
|
#"HTTP/1.1 200 OK"
|
||||||
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked" #"Another-Header: ta-daa")
|
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked" #"Another-Header: ta-daa")
|
||||||
#"This is the data in the first chand this is the second oneXXXXXXX"]
|
#"This is the data in the first chand this is the second oneXXXXXXX"]
|
||||||
|
|
||||||
["HTTP/1.1 301 Moved Permanently\r\nLocation: http://localhost:9002/whatever\r\n\r\nstuff"
|
["HTTP/1.1 301 Moved Permanently\r\nLocation: http://localhost:9002/whatever\r\n\r\nstuff"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.1 301 Moved Permanently"
|
#"HTTP/1.1 301 Moved Permanently"
|
||||||
'(#"Location: http://localhost:9002/whatever")
|
'(#"Location: http://localhost:9002/whatever")
|
||||||
#"stuff"]
|
#"stuff"]
|
||||||
|
|
||||||
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\nAnother-Header: ta-daa\r\n\r\n20\r\nThis is the data in the first ch\r\n21\r\nand this is the second oneXXXXXXX\r\n0\r\n"
|
["HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nTransfer-Encoding: chunked\r\nAnother-Header: ta-daa\r\n\r\n20\r\nThis is the data in the first ch\r\n21\r\nand this is the second oneXXXXXXX\r\n0\r\n"
|
||||||
#"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n"
|
#"GET / HTTP/1.1\r\nHost: localhost:REDACTED\r\nAccept-Encoding: gzip\r\n\r\n"
|
||||||
#"HTTP/1.1 200 OK"
|
#"HTTP/1.1 200 OK"
|
||||||
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked" #"Another-Header: ta-daa")
|
'(#"Content-Type: text/plain" #"Transfer-Encoding: chunked" #"Another-Header: ta-daa")
|
||||||
#"This is the data in the first chand this is the second oneXXXXXXX"]))
|
#"This is the data in the first chand this is the second oneXXXXXXX"]))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user