|
VLC 4.0.0-dev
|
Data Structures | |
| struct | vlc_http_msg |
Functions | |
| static bool | vlc_http_is_token (const char *) |
| static ssize_t | vlc_http_msg_find_header (const struct vlc_http_msg *m, const char *name) |
| static int | vlc_http_msg_vadd_header (struct vlc_http_msg *m, const char *name, const char *fmt, va_list ap) |
| int | vlc_http_msg_add_header (struct vlc_http_msg *m, const char *name, const char *fmt,...) |
| const char * | vlc_http_msg_get_header (const struct vlc_http_msg *m, const char *name) |
| Looks up an header field. | |
| int | vlc_http_msg_get_status (const struct vlc_http_msg *m) |
| Gets response status code. | |
| const char * | vlc_http_msg_get_method (const struct vlc_http_msg *m) |
| Gets request method. | |
| const char * | vlc_http_msg_get_scheme (const struct vlc_http_msg *m) |
| Gets request scheme. | |
| const char * | vlc_http_msg_get_authority (const struct vlc_http_msg *m) |
| Gets request authority. | |
| const char * | vlc_http_msg_get_path (const struct vlc_http_msg *m) |
| Gets request absolute path. | |
| void | vlc_http_msg_destroy (struct vlc_http_msg *m) |
| Destroys an HTTP message. | |
| struct vlc_http_msg * | vlc_http_req_create (const char *method, const char *scheme, const char *authority, const char *path) |
| Creates an HTTP request. | |
| struct vlc_http_msg * | vlc_http_resp_create (unsigned status) |
| Creates an HTTP response. | |
| void | vlc_http_msg_attach (struct vlc_http_msg *m, struct vlc_http_stream *s) |
| struct vlc_http_msg * | vlc_http_msg_iterate (struct vlc_http_msg *m) |
| Gets next response headers. | |
| struct vlc_http_msg * | vlc_http_msg_get_initial (struct vlc_http_stream *s) |
| struct vlc_http_msg * | vlc_http_msg_get_final (struct vlc_http_msg *m) |
| Gets final response headers. | |
| block_t * | vlc_http_msg_read (struct vlc_http_msg *m) |
| Receives HTTP data. | |
| int | vlc_http_msg_write (struct vlc_http_msg *m, block_t *block, bool eos) |
| Sends HTTP data. | |
| char * | vlc_http_msg_format (const struct vlc_http_msg *m, size_t *restrict lenp, bool proxied, bool chunked) |
| Formats an HTTP 1.1 message header. | |
| struct vlc_http_msg * | vlc_http_msg_headers (const char *msg) |
| Parses an HTTP 1.1 message header. | |
| struct vlc_h2_frame * | vlc_http_msg_h2_frame (const struct vlc_http_msg *m, uint_fast32_t stream_id, bool eos) |
| Formats an HTTP 2.0 HEADER frame. | |
| struct vlc_http_msg * | vlc_http_msg_h2_headers (unsigned n, const char *const hdrs[][2]) |
| Parses an HTTP 2.0 header table. | |
| char * | vlc_http_authority (const char *host, unsigned port) |
| Formats an authority. | |
| static int | vlc_http_istoken (int c) |
| static int | vlc_http_isctext (int c) |
| static size_t | vlc_http_token_length (const char *str) |
| static size_t | vlc_http_quoted_length (const char *str) |
| const char * | vlc_http_next_token (const char *value) |
| Finds next token. | |
| static const char * | vlc_http_get_token (const char *value, const char *token) |
| static char * | vlc_http_get_token_value (const char *value, const char *token) |
| const char * | vlc_http_msg_get_token (const struct vlc_http_msg *msg, const char *field, const char *token) |
| Looks up a token in a header field. | |
| static size_t | vlc_http_comment_length (const char *str) |
| static bool | vlc_http_is_agent (const char *s) |
| int | vlc_http_msg_add_agent (struct vlc_http_msg *m, const char *str) |
| Sets the agent field. | |
| const char * | vlc_http_msg_get_agent (const struct vlc_http_msg *m) |
| Gets the agent field. | |
| int | vlc_http_msg_add_time (struct vlc_http_msg *m, const char *hname, const time_t *t) |
| Adds a timestamp header field. | |
| int | vlc_http_msg_add_atime (struct vlc_http_msg *m) |
| Adds a Date header field. | |
| static time_t | vlc_http_mktime (const char *str) |
| time_t | vlc_http_msg_get_time (const struct vlc_http_msg *m, const char *name) |
| Parses a timestamp header field. | |
| time_t | vlc_http_msg_get_atime (const struct vlc_http_msg *m) |
| Gets message date. | |
| time_t | vlc_http_msg_get_mtime (const struct vlc_http_msg *m) |
| Gets resource date. | |
| unsigned | vlc_http_msg_get_retry_after (const struct vlc_http_msg *m) |
| Gets retry timeout. | |
| uintmax_t | vlc_http_msg_get_size (const struct vlc_http_msg *m) |
| Gets HTTP payload length. | |
| void | vlc_http_msg_get_cookies (const struct vlc_http_msg *m, vlc_http_cookie_jar_t *jar, const char *host, const char *path) |
| int | vlc_http_msg_add_cookies (struct vlc_http_msg *m, vlc_http_cookie_jar_t *jar) |
| char * | vlc_http_msg_get_basic_realm (const struct vlc_http_msg *m) |
| int | vlc_http_msg_add_creds_basic (struct vlc_http_msg *m, bool proxy, const char *username, const char *password) |
| Adds Basic credentials. | |
Variables | |
| static const char | vlc_http_error_loc |
| void *const | vlc_http_error = (char *)&vlc_http_error_loc |
| Error pointer value. | |
| static const char | vlc_http_days [7][4] |
| static const char | vlc_http_months [12][4] |
|
static |
References vlc_http_isctext().
Referenced by vlc_http_is_agent().
|
static |
References vlc_http_next_token(), and vlc_http_token_length().
Referenced by vlc_http_get_token_value(), and vlc_http_msg_get_token().
|
static |
References p, unlikely, vlc_http_get_token(), vlc_http_quoted_length(), and vlc_http_token_length().
Referenced by vlc_http_msg_get_basic_realm().
|
static |
References vlc_http_comment_length(), vlc_http_istoken(), and vlc_http_token_length().
Referenced by vlc_http_msg_add_agent(), and vlc_http_msg_get_agent().
|
static |
References vlc_http_token_length().
Referenced by vlc_http_msg_vadd_header().
|
static |
Referenced by vlc_http_comment_length().
|
static |
Referenced by vlc_http_is_agent(), and vlc_http_token_length().
|
static |
References timegm(), and vlc_http_months.
Referenced by vlc_http_msg_get_retry_after(), and vlc_http_msg_get_time().
| int vlc_http_msg_add_header | ( | struct vlc_http_msg * | m, |
| const char * | name, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
References name, and vlc_http_msg_vadd_header().
Referenced by vlc_http_file_req(), vlc_http_live_req(), vlc_http_msg_add_agent(), vlc_http_msg_add_cookies(), vlc_http_msg_add_creds_basic(), vlc_http_msg_add_time(), vlc_http_msg_h2_headers(), vlc_http_msg_headers(), vlc_http_outfile_create(), vlc_http_res_req(), and vlc_http_tunnel_open().
|
static |
References vlc_http_msg::count, vlc_http_msg::headers, name, and strcasecmp().
Referenced by vlc_http_msg_get_header(), and vlc_http_msg_vadd_header().
| char * vlc_http_msg_format | ( | const struct vlc_http_msg * | m, |
| size_t *restrict | lenp, | ||
| bool | proxied, | ||
| bool | chunked | ||
| ) |
Formats an HTTP 1.1 message header.
Formats an message header in HTTP 1.x format, using HTTP version 1.1.
| m | message to format/serialize |
| lenp | location to write the length of the formatted message in bytes [OUT] |
| proxied | whether the message is meant for sending to a proxy rather than an origin (only relevant for requests) |
| chunked | whether to append a chunked transfer encoding header line |
References vlc_http_msg::authority, vlc_http_msg::count, vlc_http_msg::headers, vlc_http_msg::method, vlc_http_msg::path, vlc_http_msg::scheme, vlc_http_msg::status, vlc_memstream::stream, vlc_memstream_close(), vlc_memstream_open(), vlc_memstream_printf(), and vlc_memstream_puts().
Referenced by vlc_h1_stream_open().
| struct vlc_h2_frame * vlc_http_msg_h2_frame | ( | const struct vlc_http_msg * | m, |
| uint_fast32_t | stream_id, | ||
| bool | eos | ||
| ) |
Formats an HTTP 2.0 HEADER frame.
References ARRAY_SIZE, vlc_http_msg::authority, vlc_http_msg::count, vlc_http_msg::headers, vlc_http_msg::method, vlc_http_msg::path, vlc_http_msg::scheme, vlc_http_msg::status, strcasecmp(), unlikely, vlc_alloc(), VLC_H2_DEFAULT_MAX_FRAME, and vlc_h2_frame_headers().
Referenced by vlc_h2_stream_open().
| struct vlc_http_msg * vlc_http_msg_h2_headers | ( | unsigned | n, |
| const char *const | hdrs[][2] | ||
| ) |
Parses an HTTP 2.0 header table.
References vlc_http_msg::authority, vlc_http_msg::method, name, vlc_http_msg::path, vlc_http_msg::scheme, vlc_http_msg::status, strdup(), unlikely, vlc_http_msg_add_header(), vlc_http_msg_destroy(), and vlc_http_resp_create().
Referenced by vlc_h2_stream_headers().
| struct vlc_http_msg * vlc_http_msg_headers | ( | const char * | msg | ) |
Parses an HTTP 1.1 message header.
References name, strndup(), unlikely, vlc_http_msg_add_header(), vlc_http_msg_destroy(), and vlc_http_resp_create().
Referenced by vlc_h1_stream_wait().
|
static |
References asprintf(), vlc_http_msg::count, vlc_http_msg::headers, name, p, strcasecmp(), strdup(), unlikely, vasprintf(), vlc_http_is_token(), and vlc_http_msg_find_header().
Referenced by vlc_http_msg_add_header().
|
static |
Referenced by vlc_http_get_token_value(), and vlc_http_next_token().
|
static |
References vlc_http_istoken().
Referenced by vlc_http_get_token(), vlc_http_get_token_value(), vlc_http_is_agent(), and vlc_http_is_token().
|
static |
Referenced by vlc_http_msg_add_time().
|
static |
|
static |
Referenced by vlc_http_mktime(), and vlc_http_msg_add_time().