cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl 7.16.1: socks5 seems not to work

From: Manfred Schwarb <manfred99_at_gmx.ch>
Date: Fri, 02 Feb 2007 15:06:58 +0100

-------- Original-Nachricht --------
Datum: Fri, 2 Feb 2007 10:52:21 +0100 (CET)
Von: Daniel Stenberg <daniel_at_haxx.se>
An: the curl tool <curl-users_at_cool.haxx.se>
CC:
Betreff: Re: curl 7.16.1: socks5 seems not to work

> On Fri, 2 Feb 2007, Manfred Schwarb wrote:
>
> >> So, we've broken the socks5 proxy sometime during the last few
> releases.

Well, I was wrong, I seem to have mixed some LD_LIBRARY_PATH's,
7.16.0 works.
I instrumented then url.c with some infof's and tracked it down
somewhat.
The problem arises because of the merge of "proxy" and
"data->change.proxy", which turned in 7.16.1 into
"conn->bits.httpproxy", but which seems not to mean the same.

url.c:2754 conn->bits.httpproxy = (bool)(data->set.proxy /* http proxy or not */
                                && *data->set.proxy
                                && (data->set.proxytype == CURLPROXY_HTTP));
which implies CURLPROXY_HTTP (which I'm not, beeing CURLPROXY_SOCKS5)

url.c:2857 if(!conn->bits.httpproxy) {
This was "!data->change.proxy" in 7.16.0. So we get now into the
if-clause, although we have a proxy name and everything!

Maybe in url.c:3952 we have the same issue.

Replacing url.c:2857 with
    if(!(proxy && *proxy)) {
seems to make it work, although that may be not the correct fix.

And in url.c:2231 a similar fix would be needed for the infof statement.

Regards,
Manfred

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail?ac=OM.GX.GX003K11713T4783a
Received on 2007-02-02