Lines Matching refs:url
187 char * http_client_url_parse(const char *url, struct sockaddr_in *dst, in http_client_url_parse() argument
192 u = os_strdup(url); in http_client_url_parse()
215 url, addr, port); in http_client_url_parse()
236 struct http_client * http_client_url(const char *url, in http_client_url() argument
248 if (os_strncmp(url, "http://", 7) != 0) in http_client_url()
250 u = http_client_url_parse(url, &dst, &path); in http_client_url()
255 req_buf = wpabuf_alloc(os_strlen(url) + 1000); in http_client_url()
317 char * http_link_update(char *url, const char *base) in http_link_update() argument
326 if (url == NULL) in http_link_update()
329 if (os_strncmp(url, "http://", 7) == 0) in http_link_update()
330 return url; /* absolute link */ in http_link_update()
333 return url; /* unable to handle base URL */ in http_link_update()
335 len = os_strlen(url) + 1 + os_strlen(base) + 1; in http_link_update()
338 return url; /* failed */ in http_link_update()
340 if (url[0] == '/') { in http_link_update()
343 os_snprintf(n, len, "%s%s", base, url); in http_link_update()
346 os_memcpy(n + (pos - base), url, os_strlen(url) + 1); in http_link_update()
351 os_snprintf(n, len, "%s/%s", base, url); in http_link_update()
354 os_memcpy(n + (pos - base) + 1, url, os_strlen(url) + in http_link_update()
359 os_free(url); in http_link_update()