From 8fed20859aace58145c341f91015405e1f6b4453 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Wed, 4 Sep 2013 08:56:46 -0600 Subject: [PATCH] Support gzip encoded HTTP responses original commit: 5a7ce6d60a2c6fd2b4e6dff1d6dde059d4b75964 --- .../racket-test/tests/net/http-client.rkt | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) 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 d2135180a5..4dd9bbe47a 100644 --- a/pkgs/racket-pkgs/racket-test/tests/net/http-client.rkt +++ b/pkgs/racket-pkgs/racket-test/tests/net/http-client.rkt @@ -67,92 +67,92 @@ (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" - #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.1 200 OK" '(#"Content-Type: text/plain" #"Transfer-Encoding: chunked") #"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" - #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.0 200 OK" '(#"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" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\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" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\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" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.1 200 OK" '(#"Content-Type: text/plain" #"Transfer-Encoding: chunked") #"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" - #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.1 200 OK" '(#"Content-Type: text/plain" #"Transfer-Encoding: chunked") #"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" - #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.0 200 OK" '(#"Content-Type: text/plain") #"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" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.1 200 OK" '(#"Content-Type: text/plain" #"Transfer-Encoding: chunked") #"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" - #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.0 200 OK" '(#"Content-Type: text/plain") #"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" - #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.1 200 OK" '(#"Content-Type: text/plain" #"Transfer-Encoding: chunked") #"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" - #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.0 200 OK" '(#"Content-Type: text/plain") #"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" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.1 200 OK" '(#"Content-Type: text/plain" #"Transfer-Encoding: chunked") #"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" - #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.1 200 OK" '(#"Content-Type: text/plain" #"Transfer-Encoding: chunked" #"Another-Header: ta-daa") #"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" - #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.1 301 Moved Permanently" '(#"Location: http://localhost:9002/whatever") #"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" - #"GET / HTTP/1.1\r\nHost: localhost\r\n\r\n" + #"GET / HTTP/1.1\r\nHost: localhost\r\nAccept-Encoding: gzip\r\n\r\n" #"HTTP/1.1 200 OK" '(#"Content-Type: text/plain" #"Transfer-Encoding: chunked" #"Another-Header: ta-daa") #"This is the data in the first chand this is the second oneXXXXXXX"]))