module Network.HPACK.Types (
HeaderName
, HeaderValue
, HeaderStuff
, fromHeaderName
, toHeaderName
, Header
, ByteStream
, Index
, DecodeError(..)
) where
import Control.Exception as E
import Data.ByteString (ByteString)
import Data.CaseInsensitive (foldedCase, mk)
import Data.Typeable
import Network.HTTP.Types (HeaderName, Header)
type HeaderValue = ByteString
type HeaderStuff = ByteString
fromHeaderName :: HeaderName -> HeaderStuff
fromHeaderName = foldedCase
toHeaderName :: HeaderStuff -> HeaderName
toHeaderName = mk
type ByteStream = ByteString
type Index = Int
data DecodeError = IndexOverrun Index
deriving (Show,Typeable)
instance Exception DecodeError