Lucu-0.6: HTTP Daemonic Library



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

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



isCtl :: Char -> BoolSource

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

isSeparator :: Char -> BoolSource

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

isChar :: Char -> BoolSource

isChar c is True iff c <= 0x7f.

isToken :: Char -> BoolSource

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

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.

lws :: Parser StringSource

lws is an HTTP LWS: crlf? (sp | ht)+

text :: Parser CharSource

text accepts one character which doesn't satisfy isCtl.

separator :: Parser CharSource

separator accepts one character which satisfies isSeparator.

quotedStr :: Parser StringSource

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

qvalue :: Parser DoubleSource

qvalue accepts a so-called qvalue.