Re: [PATCH 4/7] Handle missing HTTP_CONNECTCODE in curl < 7.10.7

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

 



On Wed, Apr 5, 2017 at 3:04 PM, Tom G. Christensen <tgc@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx> 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?

> Signed-off-by: Tom G. Christensen <tgc@xxxxxxxxxxxxxxx>
> ---
>  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
>



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]