cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] Support socks proxy specification in "all_proxy" variable

From: <obconseil_at_gmail.com>
Date: Thu, 28 Apr 2011 14:42:54 +0200

Thanks Dan & Daniel for your feedback. I was reworking my patch (and I had created a test708 and test709 as well).
But i'm much slower than you, since I don't know the code that well.

I just added:
> conn->bits.httpproxy = FALSE;

after the lines :
> data->set.proxytype = CURLPROXY_SOCKS5;
of the previous patch, and it seems to work.

your patch looks better, though !

Thanks for your help,

OBConseil

Le Thu, 28 Apr 2011 08:38:05 +0200 (CEST),
Daniel Stenberg <daniel_at_haxx.se> a écrit :

> On Wed, 27 Apr 2011, Dan Fandrich wrote:
>
> >> + result = parse_proxy(data, conn, proxy);
> >> + /* parse_proxy has freed the proxy string, so don't try to use it again */
> >
> > This part doesn't look right. The original code (below) had a proxy=NULL
> > line here because proxy has been freed by this point. This comment no longer
> > makes sense without that.
>
> Well, actually it does. The code below this section still uses the proxy
> pointer only as a boolean as to whether there is a proxy set or not. As it
> doesn't dereference the pointer that points to freed memory, it still works.
>
> But I agree that this is far from obvious and invites future problems. I'll
> modify the code to be more straight-forward.
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-28