@@ -30,7 +30,7 @@ import Blaze.ByteString.Builder.Enumerator (builderToByteString)
3030import qualified Data.ByteString.Lazy as L
3131import qualified Data.ByteString.Lazy.Char8 as L8
3232import qualified Network.HTTP.Types as H
33−import qualified Data.Ascii as A
33+import Data.CaseInsensitive (CI)
3434
3535type Session = ReaderT Application (StateT ClientState IO)
3636
@@ -79,7 +79,7 @@ assertBool s b = liftIO $ H.assertBool s b
7979assertString :: String -> Session ()
8080assertString s = liftIO $ H.assertString s
8181
82−assertContentType :: A.Ascii -> SResponse -> Session ()
82+assertContentType :: ByteString -> SResponse -> Session ()
8383assertContentType ct SResponse{simpleHeaders = h} =
8484 case lookup "content-type" h of
8585 Nothing -> assertString $ concat
@@ -94,7 +94,7 @@ assertContentType ct SResponse{simpleHeaders = h} =
9494 , show ct'
9595 ]) (go ct == go ct')
9696 where
97− go = A.unsafeFromByteString . S8.takeWhile (/= ';') . A.toByteString
97+ go = S8.takeWhile (/= ';')
9898
9999assertStatus :: Int -> SResponse -> Session ()
100100assertStatus i SResponse{simpleStatus = s} = assertBool (concat
@@ -114,7 +114,7 @@ assertBody lbs SResponse{simpleBody = lbs'} = assertBool (concat
114114 , show $ L8.unpack lbs'
115115 ]) $ lbs == lbs'
116116
117−assertHeader :: A.CIAscii -> A.Ascii -> SResponse -> Session ()
117+assertHeader :: CI ByteString -> ByteString -> SResponse -> Session ()
118118assertHeader header value SResponse{simpleHeaders = h} =
119119 case lookup header h of
120120 Nothing -> assertString $ concat
@@ -133,7 +133,7 @@ assertHeader header value SResponse{simpleHeaders = h} =
133133 , show value'
134134 ]) (value == value')
135135
136−assertNoHeader :: A.CIAscii -> SResponse -> Session ()
136+assertNoHeader :: CI ByteString -> SResponse -> Session ()
137137assertNoHeader header SResponse{simpleHeaders = h} =
138138 case lookup header h of
139139 Nothing -> return ()