
WebUtil encapsulates several useful utility web methods.
Slots
-
static internal Int CR
-
static internal Int HT
-
static internal Int LF
-
static internal Int SP
-
static internal Int maxTokenSize
- parseHeaders
-
static Str:Str parseHeaders(InStream in)
Parse a series of HTTP headers according to RFC 2616 section 4.2. The final CRLF which terminates headers is consumed with the stream positioned immediately following. The headers are returned as a
case insensitive
map. Throw ParseErr if headers are malformed. - parseList
-
Parse a list of comma separated tokens. Any leading or trailing whitespace is trimmed from the list of tokens.
-
static private Str token(InStream in, Int sep)
Read the next token from the stream up to the specified separator. We place a limit of 512 bytes on a single token. Consume the separate char too.