Functions | |
io_t * | response_io (response_t *rs) |
Get the I/O object of a response. | |
int | response_set_status (response_t *rs, int code) |
Set the status of a response. | |
int | response_get_status (response_t *rs) |
Get the status of a response. | |
int | response_get_method (response_t *rs) |
Get the response method. | |
int | response_redirect (response_t *rs, const char *url) |
Redirect to a given url. | |
header_t * | response_get_header (response_t *rs) |
Get the header of a response. | |
field_t * | response_get_field (response_t *rs, const char *name) |
const char * | response_get_field_value (response_t *rs, const char *name) |
int | response_set_field (response_t *rs, const char *name, const char *value) |
Set an header field of a response object. | |
int | response_set_content_type (response_t *rs, const char *mime_type) |
Set the content type of a response to a mime type. | |
int | response_set_content_length (response_t *rs, size_t sz) |
Set the content length field of a response header. | |
int | response_set_content_encoding (response_t *rs, const char *encoding) |
Set response content encoding field. | |
int | response_set_last_modified (response_t *rs, time_t mtime) |
Set the last modified field in a response header. | |
int | response_set_date (response_t *rs, time_t now) |
Set the date field in a response header. | |
int | response_set_cookie (response_t *rs, const char *name, const char *value, time_t expire, const char *path, const char *domain, int secure) |
Set the value of a cookie. | |
int | response_enable_caching (response_t *rs) |
Remove all headers that inhibit page caching. | |
int | response_disable_caching (response_t *rs) |
Add all header field that enable page caching (i.e. disable caching). |
|
Get the I/O object of reponse
Definition at line 588 of file response.c. |
|
Set the
Definition at line 633 of file response.c. Referenced by response_redirect(). |
|
Get the status of a response
Definition at line 558 of file response.c. |
|
Get the response method of
Definition at line 306 of file response.c. |
|
Redirect to url by setting the Location field in response
Definition at line 605 of file response.c. References header_add_field(), HTTP_STATUS_MOVED_TEMPORARILY, and response_set_status(). |
|
Get the header of a response
Definition at line 573 of file response.c. |
|
Set field
Definition at line 411 of file response.c. References header_set_field(). Referenced by response_disable_caching(). |
|
Set the Content-Type field of response
Definition at line 458 of file response.c. References header_set_field(). |
|
Set the Content-Length field of
Definition at line 533 of file response.c. References header_set_field(). |
|
Set the Content-Encoding field in a response object
Definition at line 82 of file response.c. References header_set_field(). |
|
Set the Last-Modified field of
Definition at line 507 of file response.c. References header_set_field(), and u_tt_to_rfc822(). |
|
Set the Date field of
Definition at line 481 of file response.c. References header_set_field(), and u_tt_to_rfc822(). |
|
Set the value of a cookie named
Definition at line 175 of file response.c. References header_add_field(), u_tt_to_rfc822(), and u_urlncpy(). |
|
Remove all HTTP Header fields that (should) prevent browsers caching. This should enable caching on specs-compliant browsers. Those fields are: Cache-Control: Expires: Pragma:
Definition at line 144 of file response.c. |
|
Adds all relevant Header fields to the current HTTP response to avoid browser caching. The function will set/modify the following fields: Cache-Control: no-cache, must-revalidate Expires: Mon, 1 Jan 1990 05:00:00 GMT Pragma: no-cache
Definition at line 111 of file response.c. References response_set_field(). |