cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Connection being reused following a cancellation (HTTP)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 2 Oct 2011 21:59:43 +0200 (CEST)

On Sun, 2 Oct 2011, Vladimir Grishchenko wrote:

>> I've now pushed commit 9dd85bced56 which fixes the problem. It now clearly
>> closes the connection in request 2 and request 3 creates a new connection.
>
> Thanks! Thinking further, is there enough information available to recognize
> the connection as not being "dirty" in this case and actually leave it open?
> It appears that closing the connection in case when no data was sent out is
> somewhat pessimistic and wastes a perfectly good connection.

I guess it would be possible. If you happen to abort exactly after the
connection is made but before the request is sent. Surely that time span is
*very* brief in real life and the number of connections you cancel in that
state should be very few? In other words: I doubt it is worth all the added
code and logic for such a very slim chance.

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