48 int _x_parse_url (
char *url,
char **proto,
char** host,
int *port,
49 char **user,
char **password,
char **uri,
50 const char **user_agent);
66 if ((cut = strstr (url,
"://")))
69 cut = strstr (base,
"://");
74 cut = cut ? strchr (cut + 3,
'/') :
NULL;
78 cut = cut ? strrchr (cut,
'/') :
NULL;
82 base_length = cut ? (size_t)(cut - base) : strlen (base);
84 return _x_asprintf (
"%.*s%s", (
int)base_length, base, url);
#define XINE_MALLOC
Definition: attributes.h:119
int _x_parse_url(char *url, char **proto, char **host, int *port, char **user, char **password, char **uri, const char **user_agent)
Definition: http_helper.c:40
NULL
Definition: xine_plugin.c:91
char * _x_asprintf(const char *format,...)
Definition: utils.c:783
#define _x_assert(exp)
Definition: xineutils.h:463
static char * _x_canonicalise_url(const char *base, const char *url)
Definition: http_helper.h:61
const char * _x_url_user_agent(const char *url)
Definition: http_helper.c:33