http2-1.6.5: HTTP/2 library including frames, priority queues and HPACK

Safe HaskellNone
LanguageHaskell2010

Network.HPACK.Token

Contents

Synopsis

Data type

data Token Source #

Internal representation for header keys.

Constructors

Token 

Fields

Instances
Eq Token Source # 
Instance details

Defined in Network.HPACK.Token

Methods

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

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

Show Token Source # 
Instance details

Defined in Network.HPACK.Token

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

tokenIx :: Token -> Int Source #

Extracting an index from a token.

tokenCIKey :: Token -> ByteString Source #

Extracting a case insensitive header key from a token.

tokenFoldedKey :: Token -> ByteString Source #

Extracting a folded header key from a token.

toToken :: ByteString -> Token Source #

Making a token from a header key.

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

Ix

minTokenIx :: Int Source #

Minimum token index.

maxStaticTokenIx :: Int Source #

Maximun token index defined in the static table.

maxTokenIx :: Int Source #

Maximum token index.

cookieTokenIx :: Int Source #

Token index for tokenCookie.

Utilities

isMaxTokenIx :: Int -> Bool Source #

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

isCookieTokenIx :: Int -> Bool Source #

Is this token ix for Cookie?

isStaticTokenIx :: Int -> Bool Source #

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

isStaticToken :: Token -> Bool Source #

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

Defined tokens

tokenConnection :: Token Source #

Not defined in the static table.

tokenTE :: Token Source #

Not defined in the static table.

tokenMax :: Token Source #

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