curl-library
Re: Persistent HTTPS connections
Date: Sat, 27 Jan 2007 20:26:54 +0100
Daniel,
>I don't think the tcpdumps help much (and they are very hard to read). I think
>you're better way off spending time by:
>
> 1 - figure out why ConnectionExists() doesn't detect and re-use your alive
> connection
>
> 2 - show us your code, or at least a small piece of code, that we can use to
> repeat this problem with to aid debugging
>
>
after adding some additional infof function calls to ConnectionExists, I
could find out that Curl_ssl_config_matches causes the problem (an infof
at this place, maybe "SSL parameters differ, can't reuse.\n" would be
nice). Within Curl_ssl_config_matches, I can see that you compare CApath
and CAfile, and this is the reason for cURL using new connections with
my application.
In my code, I create a temporary file with a CA certificate for each
connection, using a temporary file name for that. Since the file names
differ, cURL creates a new connection for the second request, and for
that reason, persistent connections are not possible.
We could now discuss whether it makes sense to compare file names where
the file contents are relevant, but I think that my approach is quite
unusual and for that reason, I will think about changing my application.
Thank you very much for your help,
Andreas
Received on 2007-01-27