WebUtil encapsulates several useful utility web methods.
Slots
-
static internal Int CR := 13 -
static internal Int HT := 9 -
static internal Int LF := 10 -
static internal Int SP := 32 -
static internal Int maxTokenSize := 512 - parseHeadersSource
-
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 insensitivemap. Throw ParseErr if headers are malformed. - parseListSource
-
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.