|
libonion
|
Functions | |
| onion_connection_status | onion_shortcut_response (const char *response, int code, onion_request *req, onion_response *res) |
| Shortcut for fast responses, like errors. | |
| onion_connection_status | onion_shortcut_response_extra_headers (const char *response, int code, onion_request *req, onion_response *res,...) |
| Shortcut for fast responses, like errors, with extra headers. | |
| onion_connection_status | onion_shortcut_redirect (const char *newurl, onion_request *req, onion_response *res) |
| Shortcut for fast redirect. It tells the browser to look somewhere else. | |
| onion_connection_status | onion_shortcut_internal_redirect (const char *newurl, onion_request *req, onion_response *res) |
| Shortcut for fast internal redirect. It returns what the server would return with the new address. | |
| onion_connection_status | onion_shortcut_response_file (const char *filename, onion_request *req, onion_response *res) |
| Shortcut for response a static file on disk. | |
| onion_connection_status | onion_shortcut_response_json (onion_dict *d, onion_request *req, onion_response *res) |
| Shortcut for response json data. Dict is freed before return. | |
| void | onion_shortcut_date_string (time_t t, char *dest) |
| Shortcut to return the date in "RFC 822 / section 5, 4 digit years" date format. | |
| void | onion_shortcut_date_string_iso (time_t t, char *dest) |
| Shortcut to return the date in ISO format. | |
| void | onion_shortcut_etag (struct stat *, char etag[32]) |
| Shortcut to return the date in time_t from a user given date TODO. | |
| int | onion_shortcut_rename (const char *orig, const char *dest) |
| Moves a file to another location. | |
| onion_connection_status onion_shortcut_internal_redirect | ( | const char * | newurl, |
| onion_request * | req, | ||
| onion_response * | res | ||
| ) |
Shortcut for fast internal redirect. It returns what the server would return with the new address.
References onion_request_t::connection, onion_request_t::fullpath, onion_request_t::listen_point, onion_handler_t::onion_handler_handle(), onion_low_free(), onion_low_strdup(), onion_request_t::path, onion_t::root_handler, and onion_listen_point_t::server.
1.8.1.2