curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: 100-continue deadlock

From: Daniel Stenberg via curl-library <>
Date: Mon, 25 Oct 2021 17:25:09 +0200 (CEST)

On Mon, 25 Oct 2021, Stephen Booth via curl-library wrote:

> I've had a problem where I get a deadlock when sending chunked data to a
> java application that has a long delay before sending the initial
> 100-continue back to curl. curl times out and starts sending the data before
> receiving the 100-continue but the application eventually tries to send the
> 100-continue and deadlocks.

From what I can tell and know, curl is following the suggested approach on how
to do 100-continue. I can't even think of another way to handle it. No matter
which timeout you use, there's always a risk for a race condition unless you
know exactly how the other end will act and can depend on it. This makes me
think that this sounds like a server-side bug.

Maybe for this case you could consider dropping the header completely?

  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
Received on 2021-10-25