testAcceptEncodingBad :: Test
testAcceptEncodingBad = testCase "gzip/acceptEncodingBad" $ do
    expectExceptionH $ Test.runHandler (Test.setHeader "Accept-Encoding" "$")
                                       snap
    expectExceptionH $ Test.runHandler
                         (Test.setHeader "Accept-Encoding" "gzip;q=^") snap
  where
    snap = withCompression $ do
               modifyResponse $ setHeader "Content-Type" "text/plain"
               writeBS "ok"


------------------------------------------------------------------------------
testAcceptEncodingBad :: Test
testAcceptEncodingBad = testCase "gzip/acceptEncodingBad" $ do
    expectExceptionH $ Test.runHandler (Test.setHeader "Accept-Encoding" "$")
                                       snap
    expectExceptionH $ Test.runHandler
                         (Test.setHeader "Accept-Encoding" "gzip;q=^") snap
  where
    snap = withCompression $ do
               modifyResponse $ setHeader "Content-Type" "text/plain"
               writeBS "ok"


------------------------------------------------------------------------------
testAcceptEncodingBad = testCase "gzip/acceptEncodingBad" $ do
    expectExceptionH $ Test.runHandler (Test.setHeader "Accept-Encoding" "$")
                                       snap
    expectExceptionH $ Test.runHandler
                         (Test.setHeader "Accept-Encoding" "gzip;q=^") snap
  where
    snap = withCompression $ do
               modifyResponse $ setHeader "Content-Type" "text/plain"
               writeBS "ok"


------------------------------------------------------------------------------