• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/wget-1.12/src/

Lines Matching refs:url

43 #include "url.h"
430 url_scheme (const char *url)
435 if (0 == strncasecmp (url, supported_schemes[i].leading_string,
454 url_has_scheme (const char *url)
456 const char *p = url;
488 url_skip_credentials (const char *url)
492 const char *p = (const char *)strpbrk (url, "@/?#;");
494 return url;
545 rewrite_shorthand_url (const char *url)
550 if (url_scheme (url) != SCHEME_INVALID)
555 p = strpbrk (url, ":/");
556 if (p == url)
574 ret = aprintf ("ftp://%s", url);
575 ret[6 + (p - url)] = '/';
581 ret = aprintf ("http://%s", url);
658 Return a new struct url if successful, NULL on error. In case of
661 struct url *
662 url_parse (const char *url, int *error, struct iri *iri, bool percent_encode)
664 struct url *u;
686 scheme = url_scheme (url);
689 if (url_has_scheme (url))
698 iri->utf8_encode = remote_to_utf8 (iri, iri->orig_url ? iri->orig_url : url, (const char **) &new_url);
702 iri->orig_url = xstrdup (url);
707 url_encoded = reencode_escapes (new_url ? new_url : url);
709 url_encoded = new_url ? new_url : url;
864 u = xnew0 (struct url);
910 u->url using url_string. */
911 u->url = url_string (u, URL_AUTH_SHOW);
913 if (url_encoded != url)
918 if (url_encoded == url)
919 u->url = xstrdup (url);
921 u->url = (char *) url_encoded;
928 if (url_encoded && url_encoded != url)
942 url_error (const char *url, int error_code)
949 char *scheme = xstrdup (url);
950 assert (url_has_scheme (url));
1009 full_path_length (const struct url *url)
1013 #define FROB(el) if (url->el) len += 1 + strlen (url->el)
1027 full_path_write (const struct url *url, char *where)
1030 char *f_el = url->el; \
1051 url_full_path (const struct url *url)
1053 int length = full_path_length (url);
1056 full_path_write (url, full_path);
1100 /* Sync u->path and u->url with u->dir and u->file. Called after
1104 sync_path (struct url *u)
1143 /* Regenerate u->url as well. */
1144 xfree (u->url);
1145 u->url = url_string (u, URL_AUTH_SHOW);
1149 This way we can sync u->path and u->url when they get changed. */
1152 url_set_dir (struct url *url, const char *newdir)
1154 xfree (url->dir);
1155 url->dir = xstrdup (newdir);
1156 sync_path (url);
1160 url_set_file (struct url *url, const char *newfile)
1162 xfree (url->file);
1163 url->file = xstrdup (newfile);
1164 sync_path (url);
1168 url_free (struct url *url)
1170 xfree (url->host);
1171 xfree (url->path);
1172 xfree (url->url);
1174 xfree_null (url->params);
1175 xfree_null (url->query);
1176 xfree_null (url->fragment);
1177 xfree_null (url->user);
1178 xfree_null (url->passwd);
1180 xfree (url->dir);
1181 xfree (url->file);
1183 xfree (url);
1464 examined, url-unescaped, and re-escaped as file name element.
1474 append_dir_structure (const struct url *u, struct growable *dest)
1501 url_file_name (const struct url *u)
1706 path_end (const char *url)
1708 enum url_scheme scheme = url_scheme (url);
1714 return strpbrk_or_eos (url, seps);
1933 url_string (const struct url *url, enum url_auth_mode auth_mode)
1939 int scheme_port = supported_schemes[url->scheme].default_port;
1940 const char *scheme_str = supported_schemes[url->scheme].leading_string;
1941 int fplen = full_path_length (url);
1948 if (url->user)
1952 quoted_user = url_escape_allow_passthrough (url->user);
1953 if (url->passwd)
1958 quoted_passwd = url_escape_allow_passthrough (url->passwd);
1965 quoted_host = url_escape_allow_passthrough (url->host);
1970 if (quoted_host != url->host)
1979 if (url->port != scheme_port)
1980 size += 1 + numdigit (url->port);
2007 if (url->port != scheme_port)
2010 p = number_to_string (p, url->port);
2013 full_path_write (url, p);
2019 if (quoted_user && quoted_user != url->user)
2022 && quoted_passwd != url->passwd)
2024 if (quoted_host != url->host)