http2-5.3.10: HTTP/2 library

Safe Haskell | None
Language | Haskell2010

Network.HPACK.Token

Synopsis

- data Token = Token {
  - tokenIx :: Int
  - shouldBeIndexed :: Bool
  - isPseudo :: Bool
  - tokenKey :: HeaderName
  }
- tokenCIKey :: Token -> ByteString
- tokenFoldedKey :: Token -> ByteString
- tokenAuthority :: Token
- tokenMethod :: Token
- tokenPath :: Token
- tokenScheme :: Token
- tokenStatus :: Token
- tokenAcceptCharset :: Token
- tokenAcceptEncoding :: Token
- tokenAcceptLanguage :: Token
- tokenAcceptRanges :: Token
- tokenAccept :: Token
- tokenAccessControlAllowOrigin :: Token
- tokenAge :: Token
- tokenAllow :: Token
- tokenAuthorization :: Token
- tokenCacheControl :: Token
- tokenContentDisposition :: Token
- tokenContentEncoding :: Token
- tokenContentLanguage :: Token
- tokenContentLength :: Token
- tokenContentLocation :: Token
- tokenContentRange :: Token
- tokenContentType :: Token
- tokenCookie :: Token
- tokenDate :: Token
- tokenEtag :: Token
- tokenExpect :: Token
- tokenExpires :: Token
- tokenFrom :: Token
- tokenHost :: Token
- tokenIfMatch :: Token
- tokenIfModifiedSince :: Token
- tokenIfNoneMatch :: Token
- tokenIfRange :: Token
- tokenIfUnmodifiedSince :: Token
- tokenLastModified :: Token
- tokenLink :: Token
- tokenLocation :: Token
- tokenMaxForwards :: Token
- tokenProxyAuthenticate :: Token
- tokenProxyAuthorization :: Token
- tokenRange :: Token
- tokenReferer :: Token
- tokenRefresh :: Token
- tokenRetryAfter :: Token
- tokenServer :: Token
- tokenSetCookie :: Token
- tokenStrictTransportSecurity :: Token
- tokenTransferEncoding :: Token
- tokenUserAgent :: Token
- tokenVary :: Token
- tokenVia :: Token
- tokenWwwAuthenticate :: Token
- tokenConnection :: Token
- tokenTE :: Token
- tokenAccessControlAllowCredentials :: Token
- tokenAccessControlAllowHeaders :: Token
- tokenAccessControlAllowMethods :: Token
- tokenAccessControlExposeHeaders :: Token
- tokenAccessControlRequestHeaders :: Token
- tokenAccessControlRequestMethod :: Token
- tokenAltSvc :: Token
- tokenContentSecurityPolicy :: Token
- tokenEarlyData :: Token
- tokenExpectCt :: Token
- tokenForwarded :: Token
- tokenOrigin :: Token
- tokenPurpose :: Token
- tokenTimingAllowOrigin :: Token
- tokenUpgradeInsecureRequests :: Token
- tokenXContentTypeOptions :: Token
- tokenXForwardedFor :: Token
- tokenXFrameOptions :: Token
- tokenXXssProtection :: Token
- tokenMax :: Token
- minTokenIx :: Int
- maxStaticTokenIx :: Int
- maxTokenIx :: Int
- cookieTokenIx :: Int
- isCookieTokenIx :: Int -> Bool
- isMaxTokenIx :: Int -> Bool
- isStaticTokenIx :: Int -> Bool
- isStaticToken :: Token -> Bool
- toToken :: ByteString -> Token

# Documentation

data Token Source #

Internal representation for header keys.

Constructors

Token |

Fields

- tokenIx :: Int

  Index for value table

- shouldBeIndexed :: Bool

  should be indexed in HPACK

- isPseudo :: Bool

  is this a pseudo header key?

- tokenKey :: HeaderName

  Case insensitive header key

#### Instances

Instances details

Show Token |
Instance details Defined in Network.HTTP.Semantics.Token Methods showsPrec :: Int -> Token -> ShowS Source # show :: Token -> String Source # showList :: [Token] -> ShowS Source #
Eq Token |
Instance details Defined in Network.HTTP.Semantics.Token Methods (==) :: Token -> Token -> Bool Source # (/=) :: Token -> Token -> Bool Source #

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.

tokenAuthority :: Token Source #

tokenMethod :: Token Source #

tokenPath :: Token Source #

tokenScheme :: Token Source #

tokenStatus :: Token Source #

tokenAcceptCharset :: Token Source #

tokenAcceptEncoding :: Token Source #

tokenAcceptLanguage :: Token Source #

tokenAcceptRanges :: Token Source #

tokenAccept :: Token Source #

tokenAccessControlAllowOrigin :: Token Source #

tokenAge :: Token Source #

tokenAllow :: Token Source #

tokenAuthorization :: Token Source #

tokenCacheControl :: Token Source #

tokenContentDisposition :: Token Source #

tokenContentEncoding :: Token Source #

tokenContentLanguage :: Token Source #

tokenContentLength :: Token Source #

tokenContentLocation :: Token Source #

tokenContentRange :: Token Source #

tokenContentType :: Token Source #

tokenCookie :: Token Source #

tokenDate :: Token Source #

tokenEtag :: Token Source #

tokenExpect :: Token Source #

tokenExpires :: Token Source #

tokenFrom :: Token Source #

tokenHost :: Token Source #

tokenIfMatch :: Token Source #

tokenIfModifiedSince :: Token Source #

tokenIfNoneMatch :: Token Source #

tokenIfRange :: Token Source #

tokenIfUnmodifiedSince :: Token Source #

tokenLastModified :: Token Source #

tokenLink :: Token Source #

tokenLocation :: Token Source #

tokenMaxForwards :: Token Source #

tokenProxyAuthenticate :: Token Source #

tokenProxyAuthorization :: Token Source #

tokenRange :: Token Source #

tokenReferer :: Token Source #

tokenRefresh :: Token Source #

tokenRetryAfter :: Token Source #

tokenServer :: Token Source #

tokenSetCookie :: Token Source #

tokenStrictTransportSecurity :: Token Source #

tokenTransferEncoding :: Token Source #

tokenUserAgent :: Token Source #

tokenVary :: Token Source #

tokenVia :: Token Source #

tokenWwwAuthenticate :: Token Source #

tokenConnection :: Token Source #

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

tokenTE :: Token Source #

tokenAccessControlAllowCredentials :: Token Source #

For QPACK

tokenAccessControlAllowHeaders :: Token Source #

tokenAccessControlAllowMethods :: Token Source #

tokenAccessControlExposeHeaders :: Token Source #

tokenAccessControlRequestHeaders :: Token Source #

tokenAccessControlRequestMethod :: Token Source #

tokenAltSvc :: Token Source #

tokenContentSecurityPolicy :: Token Source #

tokenEarlyData :: Token Source #

tokenExpectCt :: Token Source #

tokenForwarded :: Token Source #

tokenOrigin :: Token Source #

tokenPurpose :: Token Source #

tokenTimingAllowOrigin :: Token Source #

tokenUpgradeInsecureRequests :: Token Source #

tokenXContentTypeOptions :: Token Source #

tokenXForwardedFor :: Token Source #

tokenXFrameOptions :: Token Source #

tokenXXssProtection :: Token Source #

tokenMax :: Token Source #

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`.

isCookieTokenIx :: Int -> Bool Source #

Is this token ix for Cookie?

isMaxTokenIx :: Int -> Bool Source #

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

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?

toToken :: ByteString -> Token Source #

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"}