158 const
char *host, const
char *
path);
179 const
char *username, const
char *password);
242 const
char *field, const
char *token);
410 const void *base,
size_t length,
413 return s->
cbs->
write(s, base, length, eos);
475 uint_fast32_t stream_id,
bool eos);
481 const char *
const headers[][2]);
size_t count
Definition core.c:403
#define VLC_USED
Definition fourcc_gen.c:32
#define VLC_MALLOC
Definition vlc_common.h:157
#define VLC_FORMAT(x, y)
String format function annotation.
Definition vlc_common.h:193
const char * vlc_http_msg_get_header(const struct vlc_http_msg *, const char *name)
Looks up an header field.
Definition message.c:156
void vlc_http_msg_get_cookies(const struct vlc_http_msg *, struct vlc_http_cookie_jar_t *, const char *host, const char *path)
Definition message.c:934
struct vlc_http_msg * vlc_http_msg_get_final(struct vlc_http_msg *) VLC_USED
Gets final response headers.
Definition message.c:284
int vlc_http_msg_add_time(struct vlc_http_msg *msg, const char *name, const time_t *t)
Adds a timestamp header field.
Definition message.c:811
time_t vlc_http_msg_get_atime(const struct vlc_http_msg *)
Gets message date.
Definition message.c:872
int vlc_http_msg_add_header(struct vlc_http_msg *, const char *name, const char *fmt,...) VLC_FORMAT(3
Formats a header field.
int char * vlc_http_authority(const char *host, unsigned port)
Formats an authority.
Definition message.c:573
const char * vlc_http_msg_get_method(const struct vlc_http_msg *)
Gets request method.
Definition message.c:173
block_t * vlc_http_msg_read(struct vlc_http_msg *) VLC_USED
Receives HTTP data.
Definition message.c:291
void vlc_http_msg_destroy(struct vlc_http_msg *)
Destroys an HTTP message.
Definition message.c:193
const char * vlc_http_msg_get_scheme(const struct vlc_http_msg *)
Gets request scheme.
Definition message.c:178
int vlc_http_msg_add_agent(struct vlc_http_msg *, const char *)
Sets the agent field.
Definition message.c:783
time_t vlc_http_msg_get_mtime(const struct vlc_http_msg *)
Gets resource date.
Definition message.c:877
const char * vlc_http_msg_get_agent(const struct vlc_http_msg *)
Gets the agent field.
Definition message.c:795
const char * vlc_http_msg_get_authority(const struct vlc_http_msg *)
Gets request authority.
Definition message.c:183
const char * vlc_http_msg_get_path(const struct vlc_http_msg *)
Gets request absolute path.
Definition message.c:188
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.
Definition message.c:709
int vlc_http_msg_write(struct vlc_http_msg *msg, block_t *b, bool eos)
Sends HTTP data.
Definition message.c:299
uintmax_t vlc_http_msg_get_size(const struct vlc_http_msg *)
Gets HTTP payload length.
Definition message.c:905
const char * vlc_http_next_token(const char *)
Finds next token.
Definition message.c:642
unsigned vlc_http_msg_get_retry_after(const struct vlc_http_msg *)
Gets retry timeout.
Definition message.c:882
struct vlc_http_msg * vlc_http_msg_iterate(struct vlc_http_msg *) VLC_USED
Gets next response headers.
Definition message.c:265
int vlc_http_msg_add_creds_basic(struct vlc_http_msg *msg, bool proxy, const char *username, const char *password)
Adds Basic credentials.
Definition message.c:1005
int vlc_http_msg_add_atime(struct vlc_http_msg *)
Adds a Date header field.
Definition message.c:826
int vlc_http_msg_add_cookies(struct vlc_http_msg *, struct vlc_http_cookie_jar_t *)
Definition message.c:946
int vlc_http_msg_get_status(const struct vlc_http_msg *m)
Gets response status code.
Definition message.c:168
time_t vlc_http_msg_get_time(const struct vlc_http_msg *msg, const char *name)
Parses a timestamp header field.
Definition message.c:864
char * vlc_http_msg_get_basic_realm(const struct vlc_http_msg *)
Definition message.c:987
struct vlc_http_msg * vlc_http_req_create(const char *method, const char *scheme, const char *authority, const char *path) VLC_USED
Creates an HTTP request.
Definition message.c:213
struct vlc_http_msg * vlc_http_resp_create(unsigned status) VLC_USED
Creates an HTTP response.
Definition message.c:241
void vlc_http_msg_attach(struct vlc_http_msg *m, struct vlc_http_stream *s)
Definition message.c:259
static void vlc_http_stream_close(struct vlc_http_stream *s, bool abort)
Closes an HTTP stream.
Definition message.h:440
static ssize_t vlc_http_stream_write(struct vlc_http_stream *s, const void *base, size_t length, bool eos)
Write message payload data.
Definition message.h:409
void *const vlc_http_error
Error pointer value.
Definition message.c:57
static block_t * vlc_http_stream_read(struct vlc_http_stream *s)
Reads message payload data.
Definition message.h:426
struct vlc_http_msg * vlc_http_msg_get_initial(struct vlc_http_stream *s) VLC_USED
Definition message.c:276
static struct vlc_http_msg * vlc_http_stream_read_headers(struct vlc_http_stream *s)
Reads one message header.
Definition message.h:390
const char name[16]
Definition httpd.c:1298
struct vlc_http_msg * vlc_http_msg_headers(const char *msg) VLC_USED
Parses an HTTP 1.1 message header.
Definition message.c:366
struct vlc_http_msg * vlc_http_msg_h2_headers(unsigned count, const char *const headers[][2])
Parses an HTTP 2.0 header table.
Definition message.c:487
char * vlc_http_msg_format(const struct vlc_http_msg *m, size_t *restrict lenp, bool proxied, bool chunked) VLC_USED VLC_MALLOC
Formats an HTTP 1.1 message header.
Definition message.c:331
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.
Definition message.c:425
Definition vlc_frame.h:123
Definition httpcookies.c:268
char * path
Definition message.c:48
char * scheme
Definition message.c:46
char *(* headers)[2]
Definition message.c:49
short status
Definition message.c:44
char * method
Definition message.c:45
char * authority
Definition message.c:47
HTTP stream callbacks.
Definition message.h:362
struct vlc_http_msg *(* read_headers)(struct vlc_http_stream *)
Definition message.h:363
block_t *(* read)(struct vlc_http_stream *)
Definition message.h:365
ssize_t(* write)(struct vlc_http_stream *, const void *, size_t, bool eos)
Definition message.h:364
void(* close)(struct vlc_http_stream *, bool abort)
Definition message.h:366
HTTP stream.
Definition message.h:371
const struct vlc_http_stream_cbs * cbs
Definition message.h:372