Re: [PATCH 4/7] Handle missing HTTP_CONNECTCODE in curl < 7.10.7
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 5, 2017, 13:50 UTC
- Message-ID
- <CACBZZX4OVy0QOnPLYNY0pptvno+OJ-c6=sRtVWcT+40aaEGY2w@mail.gmail.com>
- In-Reply-To
- <20170405130424.13803-5-tgc@jupiterrise.com>
On Wed, Apr 5, 2017 at 3:04 PM, Tom G. Christensen <tgc@jupiterrise.com> wrote:
> With curl < 7.10.7 we cannot get the proxy CONNECT response code. > As a workaround set it to zero which means no response code available.
CC-ing Knut Franke <k.franke@science-computing.de> which added this code in 372370f167.
This effectively disables that code & this later check:
+ if (results->http_connectcode == 407) + credential_reject(&proxy_auth);
What's the impact of not taking that branch when the proxy returns a 407?
Show 25 quoted lines
> Signed-off-by: Tom G. Christensen <tgc@jupiterrise.com> > --- > http.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/http.c b/http.c > index 96d84bbed..ce618bdca 100644 > --- a/http.c > +++ b/http.c > @@ -214,8 +214,12 @@ static void finish_active_slot(struct active_request_slot *slot) > slot->results->auth_avail = 0; > #endif > > +#if LIBCURL_VERSION_NUM >= 0x070a07 > curl_easy_getinfo(slot->curl, CURLINFO_HTTP_CONNECTCODE, > &slot->results->http_connectcode); > +#else > + slot->results->http_connectcode = 0; > +#endif > } > > /* Run callback if appropriate */ > -- > 2.12.2 >