From eb09070c98c568968ee29a176c69c646a68f5dbd Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Tue, 27 Aug 2013 08:51:43 -0600 Subject: [PATCH] Parse HTTP responses more generously original commit: fbccbd8ad3183477c74ebb685457f42cfe78099e --- .../racket-test/tests/net/http-client.rkt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/racket-pkgs/racket-test/tests/net/http-client.rkt b/pkgs/racket-pkgs/racket-test/tests/net/http-client.rkt index 38778baab2..d2135180a5 100644 --- a/pkgs/racket-pkgs/racket-test/tests/net/http-client.rkt +++ b/pkgs/racket-pkgs/racket-test/tests/net/http-client.rkt @@ -78,6 +78,18 @@ '(#"Content-Type: text/plain") #"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" + #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" + #"HTTP/1.0 200 OK" + '(#"Content-Type: text/plain" #"Content-Length: 62") + #"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" + #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" + #"HTTP/1.0 200 OK" + '(#"Content-Type: text/plain" #"content-length: 62") + #"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" #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n"