cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Connection close with HTTP proxies

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 9 Dec 2013 14:46:33 +0100 (CET)

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.

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

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
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