cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problems related to probing for proxy authentication methods

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 1 Oct 2009 09:09:02 +0200 (CEST)

On Wed, 30 Sep 2009, Constantine Sapuntzakis wrote:

>> I think the erroneous bit is that CCProxy doesn't reset the connection
>> after sending the 407, it only resets it after it gets more data. I am
>> feeling like that is very nonstandard behavior:
>
> Agreed - CCProxy should send a shutdown if it doesn't support another
> request.

Indeed. I think it is a proxy bug not to.

> However, the same situation can happen with any proxy or server that does
> support persistent connections. curl sends the next header just as the proxy
> times out the persistent connection. So it would be friendlier if curl deal
> with this situation rather than propagating it to the client.

I agree here too. And libcurl already _does_ handle this case when it does a
"normal" HTTP request that isn't a CONNECT, exactly for this reason.

> Maybe the right way to deal with it is: if the request is not the first
> request on the connection and the server resets the connection, then retry
> the request on a fresh connection.

Sounds about right. The worst part is that the CONNECT function has turned
into a rather messy thing that would benefit from a little cleanup...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-10-01