CookiesHttpResponse

Constructors

this
this(HttpCookieGenerator[] cookies)

Constructor

Members

Functions

addHeaders
void addHeaders(AppendHeaderLines append)

Called by render() when the Set-Cookie header lines should be appended.

reset
void reset()

Called by reset(), resets the cookies.

Variables

cookies
HttpCookieGenerator[] cookies;

List of cookies. render() adds a Set-Cookie header line will for each cookie to which a value was assigned to after the last reset().

Inherited Members

From HttpResponse

render
cstring render(cstring msg_body, bool head)

Renders the response message, using the 200 "OK" status code. If a message body is provided, the "Content-Length" header field will be set and, if head is false, msg_body will be copied into an internal buffer.

render
cstring render(HttpResponseCode status, cstring msg_body, bool head)

Renders the response message. If a message body is provided, it is appended to the response message according to RFC 2616, section 4.3; that is, - If status is either below 200 or 204 or 304, neither a message body nor a "Content-Length" header field are appended. - Otherwise, if head is true, a "Content-Length" header field reflecting msg_body.length is appended but the message body itself is not. - Otherwise, if head is false, both a "Content-Length" header field reflecting msg_body.length and the message body itself are appended.

addHeaders
void addHeaders(AppendHeaderLines append)

Called by render() when a subclass may use append to add its response header lines.

minimizeContentBuffer
typeof(this) minimizeContentBuffer()

Sets the content buffer length to the lowest currently possible value.

AppendHeaderLines
class AppendHeaderLines

Utility class; an instance is passed to addHeaders() to be used by a subclass to append a header line to the response message.

Meta