72size_t _x_merge_mrl (
char *dest,
size_t dsize,
const char *base_mrl,
const char *new_mrl);
88 if ((cut = strstr (url,
"://")))
91 cut = strstr (base,
"://");
96 cut = cut ? strchr (cut + 3,
'/') :
NULL;
100 cut = cut ? strrchr (cut,
'/') :
NULL;
104 base_length = cut ? (size_t)(cut - base) : strlen (base);
106 return _x_asprintf (
"%.*s%s", (
int)base_length, base, url);
const char * _x_url_user_agent(const char *url)
Definition http_helper.c:497
size_t _x_merge_mrl(char *dest, size_t dsize, const char *base_mrl, const char *new_mrl)
merge a new, possibly relative mrl with a given base. result will always be 0 terminated.
Definition http_helper.c:396
void _x_url_cleanup(xine_url_t *)
Definition http_helper.c:376
static char * _x_canonicalise_url(const char *base, const char *url)
Definition http_helper.h:83
void _x_url_init(xine_url_t *url)
Definition http_helper.c:358
int _x_url_parse2(const char *mrl, xine_url_t *url)
Definition http_helper.c:158
#define XINE_MALLOC
Definition attributes.h:141
Definition http_helper.h:49
const char * password
Definition http_helper.h:57
const char * host
Definition http_helper.h:51
const char * uri
Definition http_helper.h:55
const char * proto
Definition http_helper.h:50
const char * path
Definition http_helper.h:53
const char * user
Definition http_helper.h:56
char * buf
Definition http_helper.h:58
int port
Definition http_helper.h:52
const char * args
Definition http_helper.h:54
char * _x_asprintf(const char *format,...)
Definition utils.c:783
NULL
Definition xine_plugin.c:78
#define _x_assert(exp)
Definition xineutils.h:571