http2-4.2.2: HTTP/2 library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.HPACK.Token

Synopsis

Data type

data Token #

Internal representation for header keys.

Constructors

Token 

Fields

Instances

Instances details
Show Token # 
Instance details

Defined in Network.HPACK.Token

Methods

showsPrec :: Int -> Token -> ShowS

show :: Token -> String

showList :: [Token] -> ShowS

Eq Token # 
Instance details

Defined in Network.HPACK.Token

Methods

(==) :: Token -> Token -> Bool

(/=) :: Token -> Token -> Bool

tokenCIKey :: Token -> ByteString #

Extracting a case insensitive header key from a token.

tokenFoldedKey :: Token -> ByteString #

Extracting a folded header key from a token.

toToken :: ByteString -> Token #

Making a token from a header key.

>>> toToken ":authority" == tokenAuthority
True
>>> toToken "foo"
Token {tokenIx = 73, shouldBeIndexed = True, isPseudo = False, tokenKey = "foo"}
>>> toToken ":bar"
Token {tokenIx = 73, shouldBeIndexed = True, isPseudo = True, tokenKey = ":bar"}

Ix

minTokenIx :: Int #

Minimum token index.

maxStaticTokenIx :: Int #

Maximun token index defined in the static table.

maxTokenIx :: Int #

Maximum token index.

cookieTokenIx :: Int #

Token index for tokenCookie.

Utilities

isMaxTokenIx :: Int -> Bool #

Is this token ix to be held in the place holder?

isCookieTokenIx :: Int -> Bool #

Is this token ix for Cookie?

isStaticTokenIx :: Int -> Bool #

Is this token ix for a header not defined in the static table?

isStaticToken :: Token -> Bool #

Is this token for a header not defined in the static table?

Defined tokens

tokenConnection :: Token #

A place holder to hold header keys not defined in the static table. | For Warp