1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Handle shorthands in proxy URLs.

Published in <sxs6686py1q.fsf@florida.arsdigita.de>.
This commit is contained in:
hniksic 2001-11-19 08:15:42 -08:00
parent de7f766f58
commit 94c5b23136
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2001-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
* url.c (getproxy): Handle URL shorthands.
2001-11-19 Hrvoje Niksic <hniksic@arsdigita.com>
* main.c: Remove --wait / --waitretry backwards compatibility

View File

@ -1350,6 +1350,8 @@ char *
getproxy (enum url_scheme scheme)
{
char *proxy = NULL;
char *rewritten_url;
static char rewritten_storage[1024];
switch (scheme)
{
@ -1369,6 +1371,16 @@ getproxy (enum url_scheme scheme)
}
if (!proxy || !*proxy)
return NULL;
/* Handle shorthands. */
rewritten_url = rewrite_url_maybe (proxy);
if (rewritten_url)
{
strncpy (rewritten_storage, rewritten_url, sizeof(rewritten_storage));
rewritten_storage[sizeof (rewritten_storage) - 1] = '\0';
proxy = rewritten_storage;
}
return proxy;
}