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:
parent
de7f766f58
commit
94c5b23136
@ -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
|
||||
|
12
src/url.c
12
src/url.c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user