curl-library
Re: Persistent HTTPS connections
Date: Sun, 28 Jan 2007 16:27:05 +0100
Daniel,
>> 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).
>
>
Patch?
Attached!
After getting the main thing (persistent connections) running, I have seen a minor inconsistency. cURL seems not to recognize if the server sents a FIN because it wants to close the connection for whatever reason. cURL just ignores the FIN, tries to reuse the connection, fails and builds up a new connection. Here is the tcpdump showing that:
14:33:49.477932 spok.isl.de.50843 > spok.isl.de.https: . ack 10359 win 34902 <nop,nop,timestamp 134307952 134307952> (DF)
14:33:49.483191 spok.isl.de.https > spok.isl.de.50843: P 10359:10396(37) ack 8392 win 32767 <nop,nop,timestamp 134307957 134307952> (DF)
14:33:49.483219 spok.isl.de.50843 > spok.isl.de.https: . ack 10396 win 34902 <nop,nop,timestamp 134307957 134307957> (DF)
14:33:49.483446 spok.isl.de.https > spok.isl.de.50843: F 10396:10396(0) ack 8392 win 32767 <nop,nop,timestamp 134307958 134307957> (DF)
14:33:49.523261 spok.isl.de.50843 > spok.isl.de.https: . ack 10397 win 34902 <nop,nop,timestamp 134307998 134307958> (DF)
14:33:54.228279 spok.isl.de.50843 > spok.isl.de.https: P 8392:8429(37) ack 10397 win 34902 <nop,nop,timestamp 134312703 134307958> (DF)
14:33:54.228302 spok.isl.de.https > spok.isl.de.50843: R 2262089566:2262089566(0) win 0 (DF)
14:33:54.228504 spok.isl.de.50843 > spok.isl.de.https: R 8429:8429(0) ack 10397 win 34902 <nop,nop,timestamp 134312704 134307958> (DF)
14:33:54.228599 spok.isl.de.50852 > spok.isl.de.https: S 2313362816:2313362816(0) win 32767 <mss 16396,sackOK,timestamp 134312704 0,nop,wscale 0> (DF)
Since a new connection is built up, it does not really matter that the FIN is ignored, and if you decide to ignore that, it is ok with me. However, I would more like cURL to close the connection, remove it from the used connection pool and simply build up a new connection after the FIN,
thanks in advance,
Andreas
*** url-new.c 2007-01-28 14:09:00.000000000 +0100
--- url-old.c 2007-01-28 14:04:23.000000000 +0100
***************
*** 2016,2024 ****
ssl options as well */
if(!Curl_ssl_config_matches(&needle->ssl_config,
&check->ssl_config)) {
- infof ( data,
- "Connection #%ld has different SSL parameters, can't reuse.\n",
- check -> connectindex );
continue;
}
}
--- 2016,2021 ----
Received on 2007-01-28