cURL / Mailing Lists / curl-library / Single Mail


Re: Detect if HTTP request has been reached server or not

From: Marco Strohner <>
Date: Tue, 3 Jul 2012 09:44:20 +0200


thank a lot for your fast reply, Daniel.

My test scencario for testing that the response is lost:

- call curl_easy_perform()
- the server reacts on this request (the webview shows the data that
I've sent)
- disable the network adapter at the client PC (the server doesn't
immediately send the repsonse so I have enough time)
- curl_easy_perform() returns with CURLE_COULDNT_CONNECT

Isn't this a correct test secanrio or do you have any suggestions how to
test these scenarios?

Thank a lot.

Kind Regards

Am 03.07.2012 09:06, schrieb Daniel Stenberg:
> On Tue, 3 Jul 2012, Marco Strohner wrote:
>> For both scenarios the return value of curl_easy_perform() is
> That's incorrect. libcurl doesn't return CURLE_COULDNT_CONNECT for any
> of those two scenarios. CURLE_COULDNT_CONNECT means the TCP connect
> negotiation failed, so there was no HTTP sent in any direction.
>> Are there any other possibilities to check at which state the
>> disconnect has been occured?
> libcurl reports different error codes and you can also make some good
> guesses depending on which callbacks that have been used or not.

List admin:

Received on 2012-07-03