cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: getinfo CURLINFO_LOCAL* broken (reused connections)

From: Frank Meier <frank.meier_at_ergon.ch>
Date: Mon, 29 Nov 2010 09:50:35 +0100

> Can you reproduce the issue with current git version?
yes I can

> Could you provide a code snippet that would expose the issue, or even
> better a new test case that exposes it?
I attached demo code which reproduces the issue with the easy interface,
I tested it with multi as well with the same result.
The code makes 2 curl requests with one easy-handle which one is reused
the second time. with wireshark I see the connection is indeed reused.
the result (console output) is:
....
curl finished--------------------
res:0 -> "No error" -> ""
lip:127.0.0.1 lport:53701 <---> rip:127.0.0.1 rport:80
easy end--------------------
easy start----------------
...
curl finished--------------------
res:0 -> "No error" -> ""
lip: lport:0 <---> rip:127.0.0.1 rport:0
easy end--------------------

> Making Curl_updateconninfo() unconditionally execute its code for
> reused connections introduces a needless performance penalty. If
> there's actually a problem, we better fix the origin of the problem.
completely agreed. I have to have a look at the code. I had the
impression the (ip/port)information has to be copied to the handle in
both cases new and reused, but may be I'm wrong.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2010-11-29