BSD style: see
license.txt
Initial release: April 2004
Kris
- struct HeaderElement ¶#
-
Exposes freachable HttpHeader instances
- class HttpHeadersView : HttpTokens ¶#
-
Maintains a set of input headers. These are placed into an input
buffer and indexed via a HttpStack.
- this() ¶#
-
Construct this set of headers, using a HttpStack based
upon a ':' delimiter
- this(HttpHeadersView source) ¶#
-
Clone a source set of HttpHeaders
- HttpHeadersView clone() ¶#
-
Clone this set of HttpHeadersView
- void parse(InputBuffer input) ¶#
-
Read all header lines. Everything is mapped rather
than being allocated & copied
- char[] get(HttpHeaderName name, char[] def = null) ¶#
-
Return the value of the provided header, or null if the
header does not exist
- int getInt(HttpHeaderName name, int def = -1) ¶#
-
Return the integer value of the provided header, or -1
if the header does not exist
- Time getDate(HttpHeaderName name, Time def = Time.epoch) ¶#
-
Return the date value of the provided header, or Time.epoch
if the header does not exist
- int opApply(int delegate(inout HeaderElement) dg) ¶#
-
Iterate over the set of headers. This is a shell around
the superclass, where we can convert the HttpToken into
a HeaderElement instead.
- FilteredHeaders createFilter(HttpHeaderName header) ¶#
-
Create a filter for iterating of a set of named headers.
We have to create a filter since we can't pass additional
arguments directly to an opApply() method.
- class FilteredHeaders : FilteredTokens [private, static] ¶#
-
Filter class for isolating a set of named headers.
- this(HttpHeadersView headers, HttpHeaderName header) ¶#
-
Construct a filter upon the specified headers, for
the given header name.
- int opApply(int delegate(inout HeaderElement) dg) ¶#
-
Iterate over all headers matching the given name.
This wraps the HttpToken iterator to convert the
output into a HeaderElement instead.
- class HttpHeaders : HttpHeadersView ¶#
-
Maintains a set of output headers. These are held in an output
buffer, and indexed via a HttpStack. Deleting a header could be
supported by setting the HttpStack entry to null, and ignoring
such values when it's time to write the headers.
- this() ¶#
-
Construct output headers
- this(HttpHeaders source) ¶#
-
Clone a source set of HttpHeaders
- HttpHeaders clone() ¶#
-
Clone this set of HttpHeaders
- void add(HttpHeaderName name, void delegate(OutputBuffer) dg) ¶#
-
Add the specified header, and use a callback to provide
the content.
- void add(HttpHeaderName name, char[] value) ¶#
-
Add the specified header and text
- void addInt(HttpHeaderName name, int value) ¶#
-
Add the specified header and integer value
- void addDate(HttpHeaderName name, Time value) ¶#
-
Add the specified header and long/date value
- bool remove(HttpHeaderName name) ¶#
-
Remove the specified header header. Returns false if not
found.