Lucu-1.0: Embedded HTTP Server

Network.HTTP.Lucu.Parser.Http

Description

This is an auxiliary parser utilities for parsing things related on HTTP protocol.

In general you don't have to use this module directly.

Synopsis

Documentation

isCtl :: Char -> BoolSource

isCtl c returns False iff 0x20 <= c < 0x7F.

isText :: Char -> BoolSource

isText is equivalent to not . isCtl

isSeparator :: Char -> BoolSource

isSeparator c returns True iff c is one of the HTTP separators.

isChar :: Char -> BoolSource

isChar c returns True iff c <= 0x7f.

isToken :: Char -> BoolSource

isToken c is equivalent to not (isCtl c || isSeparator c)

isSPHT :: Char -> BoolSource

Returns True for SP and HT.

listOf :: Parser a -> Parser [a]Source

listOf p is similar to sepBy p (char ',') but it allows any occurrences of lws before and after each tokens.

crlf :: Parser ()Source

The CRLF: 0x0D 0x0A.

sp :: Parser ()Source

The SP: 0x20.

lws :: Parser ()Source

HTTP LWS: crlf? (sp | ht)+

token :: Parser AsciiSource

token is almost the same as takeWhile1 isToken

separators :: Parser AsciiSource

separators is almost the same as takeWhile1 isSeparator.

quotedStr :: Parser AsciiSource

quotedStr accepts a string surrounded by double quotation marks. Quotes can be escaped by backslashes.

qvalue :: Parser DoubleSource

qvalue accepts a so-called qvalue.