Inheritance diagram for HttpHeaders:
Public Types | |
typedef HttpTokens parse | parse |
Public Member Functions | |
this () | |
this (HttpHeaders source) | |
HttpHeaders | clone () |
void | parse (IBuffer input) |
char[] | get (HttpHeaderName name, char[] def=null) |
int | getInt (HttpHeaderName name, int def=-1) |
ulong | getDate (HttpHeaderName name, ulong def=-1) |
int | opApply (int(*dg)(inout HeaderElement)) |
FilteredHeaders | createFilter (HttpHeaderName header) |
Static Public Member Functions | |
static | this () |
Private Member Functions | |
this (char separator, bool inclusive=false) | |
this (HttpTokens source) | |
void | parse (char[] content) |
void | reset () |
bool | isParsed () |
void | setParsed (bool parsed) |
char[] | get (char[] name, char[] ret=null) |
int | getInt (char[] name, int ret=-1) |
ulong | getDate (char[] name, ulong date=Rfc1123.InvalidEpoch) |
int | opApply (int(*dg)(inout HttpToken)) |
void | write (IWriter writer) |
bool | handleMissingSeparator (char[] s, inout HttpToken element) |
private bool | split (Token t, inout HttpToken element) |
FilteredTokens | createFilter (char[] match) |
void | setOutputBuffer (IBuffer output) |
IBuffer | getOutputBuffer () |
char[] | toOutputString () |
void | add (char[] name, void(*dg)(IBuffer)) |
void | add (char[] name, char[] value) |
void | addInt (char[] name, int value) |
void | addDate (char[] name, ulong value) |
Private Attributes | |
TokenStack | stack |
Static Private Attributes | |
static BoundToken | line |
Classes | |
class | FilteredHeaders |
Definition at line 153 of file HttpHeaders.d.
|
Definition at line 158 of file HttpHeaders.d. |
|
Setup a line tokenizer for later use Reimplemented from HttpTokens. Definition at line 166 of file HttpHeaders.d. References line. |
|
Construct this set of headers, using a TokenStack based upon a ':' delimeter Reimplemented from HttpTokens. Definition at line 181 of file HttpHeaders.d. |
|
Clone a source set of HttpHeaders Definition at line 194 of file HttpHeaders.d. |
|
Clone this set of HttpHeaders Reimplemented in HttpMutableHeaders. Definition at line 205 of file HttpHeaders.d. References HttpHeaders. |
|
Read all header lines. Everything is mapped rather than being allocated & copied Reimplemented from HttpTokens. Definition at line 217 of file HttpHeaders.d. References Token::getLength(), line, BoundToken::next(), TokenStack::push(), and HttpTokens::setParsed(). |
|
Return the value of the provided header, or null if the header does not exist Definition at line 231 of file HttpHeaders.d. References HttpHeaderName::value. Referenced by HttpResponse::commit(), HttpMessage::getContentType(), and HttpClient::open(). |
|
Return the integer value of the provided header, or -1 if the header does not exist Definition at line 243 of file HttpHeaders.d. References HttpHeaderName::value. Referenced by HttpRequest::getInputParameters(). |
|
Return the date value of the provided header, or -1 if the header does not exist Definition at line 255 of file HttpHeaders.d. References HttpHeaderName::value. Referenced by MethodServlet::get(). |
|
Iterate over the set of headers. This is a shell around the superclass, where we can convert the HttpToken into a HeaderElement instead. Definition at line 268 of file HttpHeaders.d. References HeaderElement::name, HeaderElement::value, and HttpHeaderName::value. |
|
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. Definition at line 292 of file HttpHeaders.d. |
|
Construct a set of tokens based upon the given delimeter, and an indication of whether said delimeter should be considered part of the left side (effectively the name). The latter is useful with headers, since the seperating ':' character should really be considered part of the name for purposes of subsequent token matching. Definition at line 119 of file HttpTokens.d. References HttpTokens::inclusive, HttpTokens::input, HttpTokens::separator, HttpTokens::sepString, HttpTokens::stack, and TokenStack. |
|
Clone a source set of HttpTokens Definition at line 139 of file HttpTokens.d. References TokenStack::clone(), HttpTokens::inclusive, HttpTokens::input, HttpTokens::output, HttpTokens::parsed, HttpTokens::separator, HttpTokens::sepString, and HttpTokens::stack. |
|
Parse an input string. Definition at line 165 of file HttpTokens.d. References HttpTokens::input, HttpTokens::parse(), and IBuffer::setValidContent(). |
|
Reset this set of tokens. Definition at line 177 of file HttpTokens.d. References IBuffer::clear(), HttpTokens::output, HttpTokens::parsed, TokenStack::reset(), and HttpTokens::stack. Referenced by HttpClient::open(), and HttpClient::reset(). |
|
Have tokens been parsed yet? Definition at line 193 of file HttpTokens.d. References HttpTokens::parsed. |
|
Indicate whether tokens have been parsed or not. Definition at line 204 of file HttpTokens.d. Referenced by HttpParams::parse(), and parse(). |
|
Return the value of the provided header, or null if the header does not exist Definition at line 216 of file HttpTokens.d. References TokenStack::findToken(), HttpTokens::split(), HttpTokens::stack, HttpTokens::trim(), and HttpToken::value. Referenced by AdminServlet::addLogger(), HttpTokens::getDate(), HttpTokens::getInt(), AdminServlet::service(), and AdminServlet::setLoggerLevel(). |
|
Return the integer value of the provided header, or the provided default-vaule if the header does not exist Definition at line 236 of file HttpTokens.d. References HttpTokens::get(), and Integer. Referenced by AdminServlet::addLogger(). |
|
Return the date value of the provided header, or the provided default-value if the header does not exist Definition at line 253 of file HttpTokens.d. References HttpTokens::get(). |
|
Iterate over the set of tokens Definition at line 269 of file HttpTokens.d. References HttpTokens::split(), and HttpTokens::stack. |
|
Output the token list to the provided writer Reimplemented from IWritable. Definition at line 290 of file HttpTokens.d. References IWriter::cr(), IWriter::put(), HttpTokens::stack, and Token::toString(). |
|
overridable method to handle the case where a token does not have a separator. Apparently, this can happen in HTTP usage Reimplemented in HttpQueryParams. Definition at line 308 of file HttpTokens.d. Referenced by HttpTokens::split(). |
|
split basic token into an HttpToken Definition at line 319 of file HttpTokens.d. References HttpTokens::emptyString, HttpTokens::handleMissingSeparator(), HttpTokens::inclusive, HttpTokens::separator, Text, and Token::toString(). Referenced by HttpTokens::get(), HttpTokens::FilteredTokens::opApply(), and HttpTokens::opApply(). |
|
Create a filter for iterating over the tokens matching a particular name. Definition at line 349 of file HttpTokens.d. |
|
Set the output buffer for adding tokens to. This is used by the various MutableXXXX classes. Definition at line 452 of file HttpTokens.d. References HttpTokens::output. |
|
Return the buffer used for output. Reimplemented in HttpMutableHeaders. Definition at line 463 of file HttpTokens.d. References HttpTokens::output. |
|
Return a char[] representing the output. An empty array is returned if output was not configured. Definition at line 475 of file HttpTokens.d. References HttpTokens::output, and IBuffer::toString(). |
|
Add a token with the given name. The content is provided via the specified delegate. We stuff this name & content into the output buffer, and map a new Token onto the appropriate buffer slice. Definition at line 493 of file HttpTokens.d. References IBuffer::append(), IBuffer::getLimit(), HttpTokens::inclusive, HttpTokens::output, TokenStack::push(), HttpTokens::sepString, HttpTokens::stack, and IBuffer::toString(). Referenced by HttpTokens::add(), HttpTokens::addDate(), and HttpTokens::addInt(). |
|
Add a simple name/value pair to the output Reimplemented in HttpMutableParams. Definition at line 519 of file HttpTokens.d. References HttpTokens::add(), and buffer. |
|
Add a name/integer pair to the output Reimplemented in HttpMutableParams. Definition at line 535 of file HttpTokens.d. References HttpTokens::add(), and Integer. |
|
Add a name/date(long) pair to the output Reimplemented in HttpMutableParams. Definition at line 549 of file HttpTokens.d. References HttpTokens::add(). |
|
Definition at line 155 of file HttpHeaders.d. |
|
Definition at line 86 of file HttpTokens.d. Referenced by HttpTokens::add(), HttpTokens::get(), HttpTokens::FilteredTokens::opApply(), HttpTokens::opApply(), HttpTokens::reset(), HttpTokens::this(), and HttpTokens::write(). |