cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Connection close with HTTP proxies

From: Michael-O <1983-01-06_at_gmx.net>
Date: Mon, 09 Dec 2013 14:13:51 +0100

Am 2013-12-09 14:08, schrieb Daniel Stenberg:
> On Mon, 9 Dec 2013, Michael-O wrote:
>
>> though I did not fully understand the code. Does you answer imply that
>> a connection is only closed when no continuation is necessary, e.g.
>> not 401/407, 301, etc.?
>
> The closure is only interesting after the response has been handled. In
> the 200 case that's basically not happening because as soon as the
> tunnel to the peer has started there's no way for the proxy to again
> inject any data/headers to the client.
>
> If the response is not 200 then there's no tunnel setup but just a
> "normal" response and then the close is relevant. Especially for 401/407
> responses when curl needs to send another request.

The last statement confuses me a bit. You won't receive any response
unless you have issues a CONNECT and have established a connecion. After
that you should receive the downstream response through the proxy. So
the tunnel is already there regardless of the status code?!

Mike

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-12-09