Re: HTTP PUT stalls on curl_easy_perform()
Date: Thu, 10 Mar 2016 23:14:44 +0100 (CET)
On Thu, 10 Mar 2016, Daniel Ragnarsson wrote:
> I see a problem with curl_easy_perform() seemingly stalling mid-operation.
> Fairly often it times out. That is after all data has been written to the
> socket. With the verbose flag set, curl tells me we are completely uploaded
> and fine. The server has received the data - I can get the keys and check
> them. This happens with and without using the 100-continue header.
> I just never see the 200 OK. Normally I would start looking at the server
> side, but using boto or Node sdk's, I don't see this problem at all.
So you're seeing this only with specific servers/networks?
There's really no particular mode or state changes in libcurl when the upload
part is done, as it sends and receives data simultaneously and when talking
HTTP it needs to get a response before being done. So it waits for the
response already from the beginning.
> - Is there a chance that libcurl simply misses the 200 OK response from the
That'd surprise me, but of course there's always a risk there's a bug
somewhere. I can't recall any bug like this in the past though.
> - what can I have done to cause it?
Nothing. Barring bugs, libcurl can't be tricked into "missing" data no matter
what you do.
> - what can I do to verify it?
Use CURLOPT_DEBUGFUNCTION and log everything libcurl sends and receives, and
I'm sure you'll find that it never receives any 200 OK. My money is on
> - how can I resolve it?
First you need to figure out if the 200 OK is received in the client machine
or not. Then you know where to dig in deeper to figure out why it stopped
where it stopped.
> For compatibility reasons, most likely we will need to run an old libcurl
> 7.19.7 and openssl 1.0.1e in production. Currently I am using 7.35.0/1.0.1f
> on my dev machine.
7.19.7 is amazingly old but if you also see the problem with 7.35.0 we at
least know it isn't because of a 6 year old problem. But it can still be a 2
year old problem. For your own sanity, I would recommend also trying out the
latest libcurl version just to make sure that the problem is still seen there
as otherwise you might waste a lot of time searching for a problem that is
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2016-03-10