on master help sign in
Fix the httpbin tests
a1c5f28mrkkrp
httpbin-tests/Network/HTTP/ReqSpec.hs−7
@@ -67,7 +67,6 @@ spec = do
67 stripFunnyHeaders (responseBody r) `shouldBe` object
67 stripFunnyHeaders (responseBody r) `shouldBe` object
68 [ "headers" .= object
68 [ "headers" .= object
69 [ "Accept-Encoding" .= ("gzip" :: Text)
69 [ "Accept-Encoding" .= ("gzip" :: Text)
70− , "Connection" .= ("close" :: Text)
71 , "Foo" .= ("bar" :: Text)
70 , "Foo" .= ("bar" :: Text)
72 , "Baz" .= ("quux" :: Text)
71 , "Baz" .= ("quux" :: Text)
73 , "Host" .= ("httpbin.org" :: Text) ] ]
72 , "Host" .= ("httpbin.org" :: Text) ] ]
@@ -82,7 +81,6 @@ spec = do
82 , "url" .= ("https://httpbin.org/get" :: Text)
81 , "url" .= ("https://httpbin.org/get" :: Text)
83 , "headers" .= object
82 , "headers" .= object
84 [ "Accept-Encoding" .= ("gzip" :: Text)
83 [ "Accept-Encoding" .= ("gzip" :: Text)
85− , "Connection" .= ("close" :: Text)
86 , "Host" .= ("httpbin.org" :: Text) ] ]
84 , "Host" .= ("httpbin.org" :: Text) ] ]
87 responseHeader r "Content-Type" `shouldBe` return "application/json"
85 responseHeader r "Content-Type" `shouldBe` return "application/json"
88 responseStatusCode r `shouldBe` 200
86 responseStatusCode r `shouldBe` 200
@@ -101,7 +99,6 @@ spec = do
101 , "headers" .= object
99 , "headers" .= object
102 [ "Content-Type" .= ("application/json; charset=utf-8" :: Text)
100 [ "Content-Type" .= ("application/json; charset=utf-8" :: Text)
103 , "Accept-Encoding" .= ("gzip" :: Text)
101 , "Accept-Encoding" .= ("gzip" :: Text)
104− , "Connection" .= ("close" :: Text)
105 , "Host" .= ("httpbin.org" :: Text)
102 , "Host" .= ("httpbin.org" :: Text)
106 , "Content-Length" .= show (T.length reflected) ]
103 , "Content-Length" .= show (T.length reflected) ]
107 , "files" .= emptyObject
104 , "files" .= emptyObject
@@ -125,7 +122,6 @@ spec = do
125 , "headers" .= object
122 , "headers" .= object
126 [ "Content-Type" .= T.decodeUtf8 contentType
123 [ "Content-Type" .= T.decodeUtf8 contentType
127 , "Accept-Encoding" .= ("gzip" :: Text)
124 , "Accept-Encoding" .= ("gzip" :: Text)
128− , "Connection" .= ("close" :: Text)
129 , "Host" .= ("httpbin.org" :: Text)
125 , "Host" .= ("httpbin.org" :: Text)
130 , "Content-Length" .= ("242" :: Text)
126 , "Content-Length" .= ("242" :: Text)
131 ]
127 ]
@@ -151,7 +147,6 @@ spec = do
151 , "url" .= ("https://httpbin.org/patch" :: Text)
147 , "url" .= ("https://httpbin.org/patch" :: Text)
152 , "headers" .= object
148 , "headers" .= object
153 [ "Accept-Encoding" .= ("gzip" :: Text)
149 [ "Accept-Encoding" .= ("gzip" :: Text)
154− , "Connection" .= ("close" :: Text)
155 , "Host" .= ("httpbin.org" :: Text)
150 , "Host" .= ("httpbin.org" :: Text)
156 , "Content-Length" .= show (T.length contents) ]
151 , "Content-Length" .= show (T.length contents) ]
157 , "files" .= emptyObject
152 , "files" .= emptyObject
@@ -174,7 +169,6 @@ spec = do
174 , "headers" .= object
169 , "headers" .= object
175 [ "Content-Type" .= ("application/x-www-form-urlencoded" :: Text)
170 [ "Content-Type" .= ("application/x-www-form-urlencoded" :: Text)
176 , "Accept-Encoding" .= ("gzip" :: Text)
171 , "Accept-Encoding" .= ("gzip" :: Text)
177− , "Connection" .= ("close" :: Text)
178 , "Host" .= ("httpbin.org" :: Text)
172 , "Host" .= ("httpbin.org" :: Text)
179 , "Content-Length" .= ("18" :: Text) ]
173 , "Content-Length" .= ("18" :: Text) ]
180 , "files" .= emptyObject
174 , "files" .= emptyObject
@@ -352,7 +346,6 @@ stripFunnyHeaders (Object m) =
352 f value = value
346 f value = value
353 hs = [ "Content-Type"
347 hs = [ "Content-Type"
354 , "Accept-Encoding"
348 , "Accept-Encoding"
355− , "Connection"
356 , "Host"
349 , "Host"
357 , "Content-Length"
350 , "Content-Length"
358 , "Foo"
351 , "Foo"