19 #ifndef _ASTERISK_HTTP_H
20 #define _ASTERISK_HTTP_H
void ast_http_error(struct ast_tcptls_session_instance *ser, int status, const char *title, const char *text)
Send HTTP error message and close socket.
ast_http_callback callback
void ast_http_auth(struct ast_tcptls_session_instance *ser, const char *realm, const unsigned long nonce, const unsigned long opaque, int stale, const char *text)
Send http "401 Unauthorized" response and close socket.
int ast_http_uri_link(struct ast_http_uri *urihandler)
Register a URI handler.
const char * ast_http_ftype2mtype(const char *ftype) attribute_pure
Return mime type based on extension.
Structure for variables, used for configurations and for channel variables.
void ast_http_uri_unlink(struct ast_http_uri *urihandler)
Unregister a URI handler.
Configuration File Parser.
uint32_t ast_http_manid_from_vars(struct ast_variable *headers) attribute_pure
Return manager id, if exist, from request headers.
Generic support for tcp/tls servers in Asterisk.
struct ast_http_uri::@175 entry
void ast_http_send(struct ast_tcptls_session_instance *ser, enum ast_http_method method, int status_code, const char *status_title, struct ast_str *http_header, struct ast_str *out, const int fd, unsigned int static_content)
Generic function for sending http/1.1 response.
A set of macros to manage forward-linked lists.
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
const char * ast_get_http_method(enum ast_http_method method) attribute_pure
Return http method name string.
static size_t get_params(va_list ap, const char ***params_ptr, const char ***vals_ptr, int warn)
Helper function to parse a va_list object into 2 dynamic arrays of strings, parameters and values...
int(* ast_http_callback)(struct ast_tcptls_session_instance *ser, const struct ast_http_uri *urih, const char *uri, enum ast_http_method method, struct ast_variable *get_params, struct ast_variable *headers)
HTTP Callbacks.
Definition of a URI handler.
void ast_http_prefix(char *buf, int len)
Return the current prefix.
struct ast_variable * ast_http_get_post_vars(struct ast_tcptls_session_instance *ser, struct ast_variable *headers)
Get post variables from client Request Entity-Body, if content type is application/x-www-form-urlenco...
void ast_http_uri_unlink_all_with_key(const char *key)
Unregister all handlers with matching key.
ast_http_method
HTTP Request methods known by Asterisk.
struct ast_variable * ast_http_get_cookies(struct ast_variable *headers)
Get cookie from Request headers.