@@ -42,6 +42,7 @@ testSuite = testGroup "Network.Wai.Parse"
4242 , testCase "takeLine" caseTakeLine
4343 , testCase "jsonp" caseJsonp
4444 , testCase "gzip" caseGzip
45+ , testCase "gzip not for MSIE" caseGzipMSIE
4546 , testCase "vhost" caseVhost
4647 , testCase "autohead" caseAutohead
4748 , testCase "method override" caseMethodOverride
@@ -259,6 +260,17 @@ caseGzip = flip runSession gzipApp $ do
259260 assertNoHeader "Content-Encoding" sres2
260261 assertBody "test" sres2
261262
263+caseGzipMSIE :: Assertion
264+caseGzipMSIE = flip runSession gzipApp $ do
265+ sres1 <- request Request
266+ { requestHeaders =
267+ [ ("Accept-Encoding", "gzip")
268+ , ("User-Agent", "Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 6.0)")
269+ ]
270+ }
271+ assertNoHeader "Content-Encoding" sres1
272+ liftIO $ simpleBody sres1 @?= "test"
273+
262274vhostApp1 = const $ return $ responseLBS status200 [] "app1"
263275vhostApp2 = const $ return $ responseLBS status200 [] "app2"
264276vhostApp = vhost