HttpCookieGenerator

Constructors

this
this(istring id, istring[] attribute_names)

Constructor

Members

Functions

render
void render(void delegate(cstring str) appendContent)

Renders the HTTP response Cookie header line field value.

reset
void reset()

Clears the expiration time.

value
cstring value(cstring val)

Sets the cookie value.

value
cstring value()

Variables

domain
cstring domain;

Cookie domain and path

expiration_time
ExpirationTime expiration_time;

Expiration time manager instance

id
istring id;

Cookie ID

path
cstring path;

Cookie domain and path

Inherited Members

From ParamSet

Element
struct Element
Undocumented in source.
skip_null_values_on_iteration
bool skip_null_values_on_iteration;

Set to true to skip key/value pairs with a null value on 'foreach' iteration.

ulong_dec_length
auto ulong_dec_length;

Minimum required buffer length for decimal formatting of an uint value

opIndex
cstring opIndex(cstring key)

Obtains the parameter value corresponding to key. key must be one of the parameter keys passed on instantiation or added by a subclass.

opIn_r
cstring* opIn_r(cstring key)

Obtains the parameter value corresponding to key.

getElement
Element getElement(cstring key)

Obtains the parameter value corresponding to key, bundled with the original key.

getUnsigned
bool getUnsigned(cstring key, T n, bool is_set)
bool getUnsigned(cstring key, T n)

Obtains the parameter value corresponding to key which is expected to be an unsigned decimal integer number and not empty. key must be one of the parameter keys passed on instantiation or added by a subclass.

opIndexAssign
cstring opIndexAssign(cstring val, cstring key)

Sets the parameter value for key. Key must be one of the parameter keys passed on instantiation or added by a subclass.

set
bool set(cstring key, cstring val)

Sets the parameter value for key if key is one of the parameter keys passed on instantiation or added by a subclass.

set
bool set(cstring key, size_t val, mstring dec)

ditto

access
bool access(cstring key, void delegate(cstring key, ref cstring val) dg)

Invokes dg with the original key and a reference to the parameter value for key if key is one of parameter keys passed on instantiation or added by a subclass.

matches
bool matches(cstring key, cstring val)

Compares the parameter value corresponding to key with val in a case-insensitive manner.

opApply
int opApply(int delegate(ref cstring key, ref cstring val) dg)

'foreach' iteration over parameter key/value pairs

reset
void reset()

Resets all parameter values to null.

strncasecmp
int strncasecmp(cstring a, cstring b)

Compares a to b, treating ASCII characters case-insensitively. If a and b have a different length, the first common characters are compared. If these are equal, the longer string compares greater.

addKeys
void addKeys(cstring[] keys)

Adds an entry for key.

addKey
cstring addKey(cstring key)

Adds an entry for key.

get_
Element* get_(cstring key)

Looks up key in a case-insensitive manner.

tolower
mstring tolower(cstring key)

Converts key to lower case, writing to a separate buffer so that key is left untouched.

rehash
void rehash()

Rehashes the associative array.

iterate
void iterate(Element element, int delegate(ref cstring key, ref cstring val) dg, int result)

opApply() helper, invokes dg with element.key & val.

writeUnsigned
mstring writeUnsigned(mstring dst, ulong n)

Converts n to decimal representation, writing to dst. dst must be long enough to hold the result. The result will be written to the end of dst, returning a slice to the valid content in dst.

readUnsigned
cstring readUnsigned(cstring src, T x)

Converts str, which is expected to contain a decimal number, to the number it represents. Tailing and leading whitespace is allowed and will be trimmed. If src contains non-decimal digit characters after trimming, conversion will be stopped at the first non-decimal digit character.

Meta