curl / Mailing Lists / curl-library / Single Mail


Re: libCurl does not send data using multi interface on high latency connections

From: Daniel Stenberg via curl-library <>
Date: Wed, 12 Sep 2018 23:25:14 +0200 (CEST)

On Wed, 12 Sep 2018, Nicolás Bagnasco via curl-library wrote:

> Hi, I am using libCurl's multi interface with boost::asio and I noticed that
> on high latency connections (200 ms or more) libCurl manages to open the
> connection, but it does not send any data, so the server never replies back.

If you try the curl command line tool on the same URL, I presume it works?

Just the other day I added a warning blurb at the top of the asiohiper.cpp
example since it has been proven to not work properly (and nobody has fixed
it). I hope your app isn't based purely on that example but on your fine
knowledge of boost::asio and how to use libcurl with that.

Due to 200+ ms latency connections being pretty common and nobody else has
reported this problem before, I believe this is the result of a specific
combination of things that we need to figure out.

> I've sniffed my network with wireshark to see what's going on, and
> what I can see is that libCurl successfully opens the tcp connection
> (it does all the handshake process), but then it does not send any
> data to the server (for example a GET request).

In that situation libcurl should've already told your app that it wants to
wait on that socket to become writable and when it does (when it can send the
request over it), you should've called libcurl telling it about that fact. Did
that happen or not?

> You can reproduce this bug even in the asiohiper example from the curl
> Example page:

Right, but since we *know* that the example isn't correct, it could also just
be the example app not using libcurl correctly.

I personally don't know anything about boost::asio so I'm not a suitable
person to fix the example code nor to debug a boost::asio-using application.


Received on 2018-09-12