curl / Mailing Lists / curl-users / 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: How to handle a response with an empty body

From: Daniel Stenberg via curl-users <>
Date: Fri, 15 May 2020 23:19:53 +0200 (CEST)

On Fri, 15 May 2020, Konrad Mathieu via curl-users wrote:

>> You can return an error in the write callback to make curl stop handling
>> the body (and return an error).
> That approach works fine! However, when a connection is aborted due to a
> missing body, I can only retrieve the header information asynchronously.

I don't understand what that means. The response headers comes before the
body, you will receive them before you cancel the tranfer in that callback!

  / | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
Received on 2020-05-15