37 const char *authorization,
const char *hostname,
38 int port,
const char *
fmt, ...)
47 if (authorization && authorization[0])
49 #if CONFIG_NETWORK && defined(AF_INET6)
54 if (ai->ai_family == AF_INET6) {
71 int len = strlen(str);
74 vsnprintf(str + len, size > len ? size - len : 0, fmt, vl);
83 char *sep, *path_query;
85 if (base && strstr(base,
"://") && rel[0] ==
'/') {
88 sep = strstr(buf,
"://");
96 sep = strchr(sep,
'/');
105 if (!base || strstr(rel,
"://") || rel[0] ==
'/') {
113 path_query = strchr(buf,
'?');
114 if (path_query != NULL)
124 sep = strrchr(buf,
'/');
132 sep = strrchr(buf,
'/');
134 if (!strcmp(sep ? &sep[1] : buf,
"..")) {