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 15:05:15 +0100

Am 2013-12-09 14:46, schrieb Daniel Stenberg:
> On Mon, 9 Dec 2013, Michael-O wrote:
>
>>> 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.
>
> Anything that isn't a 2XX response means that there isn't a tunnel yet
> and the response comes from the proxy. The most obvious case is 407.

Ah, that's the point I did not know about. I am not familiar with the
mechanics of a proxy in conjunction with TLS/SSL. In my case, 407, curl
sees that and sees that a Connection: close comes from the proxy. There
is no SSL session yet but a TCP connection of course. That one isn't
terminated. Simply this twilight period isn't really clear to me.

>> After that you should receive the downstream response through the proxy.
>
> After the 200 and the associated proxy response headers, yes.
>
>> So the tunnel is already there regardless of the status code?!
>
> No... what did I say that implied that?

That one has been cleared now.

Michael

-------------------------------------------------------------------
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