bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [patch] new variant of Dominique Leuenberger's libproxy p


From: Ángel González
Subject: Re: [Bug-wget] [patch] new variant of Dominique Leuenberger's libproxy patch
Date: Thu, 19 Apr 2012 00:30:52 +0200
User-agent: Thunderbird

On 18/04/12 19:24, Lucian Muresan wrote:
> There was one more problem with the old patch, the debug statements used
> code which was only built when debug was generally enabled, so I moved
> the #ifdef DEBUG_ENABLED statements inside the definition of
> debug_logprintf, that way the code is either an empty function, or one
> which only logs when we built with debug upport and also request debug
> output. At least it can no longer fail on linking...
> Would be nice if this feature could be included in the next release,
> what do you think? Of course, main credits go to Dominique, I only
> re-arranged his patch.
>
> Regards,
> Lucian
Thanks for your work.
Some minor comments:
In line with the recent const discussion in this list, direct should be
const char[].
The wget code generally uses C89 variable definition before statements,
which would be nice to keep by this patch.
The two asprintf() are just strdup() in disguise, so I'd use the later
function.
Moreover, they're both unneeded.

As you moved the libproxy code above wget proxy code, it would now be
possible
for the pac file to return "do a direct connection", and for wget to try
nonetheless
a proxy from http_proxy env variable (probably a default for
non-libproxy aware
programs).
Not sure if httpproxy from .wgetrc should be honored in that case or not.

A further enhacement would be having wget support multiple proxies, as
is expected
by libproxy ("If the first proxy fails, the second should be tried,
etc..."), but just
supporting the first proxy (as in openSUSE patch) seems a good enough
change for
the first addition of libproxy support.

Regards




reply via email to

[Prev in Thread] Current Thread [Next in Thread]