cURL / Mailing Lists / curl-library / Single Mail


HTTP PUT stalls on curl_easy_perform()

From: Daniel Ragnarsson <>
Date: Thu, 10 Mar 2016 08:44:01 -0800


I see a problem with curl_easy_perform() seemingly stalling mid-operation.

What I do is an HTTP(S) PUT to an S3-like backend, in a manner roughly
like this


do {

   if (success)


} while(n_retries++ < max_retries);

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.

Also, the server only allows HTTPS, so I can't easily just listen to
network traffic and see what is sent.

- Is there a chance that libcurl simply misses the 200 OK response from
the server?
- If so,
   - what can I have done to cause it?
   - what can I do to verify it?
   - how can I resolve it?

Things I have tried:

- Using/not using Expect: 100-continue
- Cleaning up the handle and getting a new one each retry
- Not cleaning up the handle and getting a new one
- Setting/omitting flags like CURLOPT_FRESH_CONNECT,

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.



List admin:
Received on 2016-03-10