cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl error - HTTP error before end of send, stop sending

From: Rahul R <rahul.rathi2005_at_gmail.com>
Date: Thu, 2 May 2013 17:08:37 +0530

>
> Hi Daniel,
>
> Can you please reply to the query below ? If curl_easy_perform() doesn't
> return an error, can curl_easy_get_info() get the HTPP error code which can
> let the application know that something is not right ?
>
> Its very critical for me to handle this error. I am not able to reproduce
> this. When such error can occur ?
>
    Does this occur because of server issue or client issue ?

>
> Thanks,
> Rahul
>
>
> On Tue, Apr 30, 2013 at 6:15 PM, Rahul R <rahul.rathi2005_at_gmail.com>wrote:
>
>> Sure Dainel.
>>
>> But i wanted to understand if its really a bug. I
>>
>> n the case below, is it possible that curl_easy_perform() returns
>> CURLE_OK, but at least does it return HTTP code other than 200 ? So that
>> the caller can know there was an error while uploading data.
>>
>> Otherwise, it can be a data loss from application's perspective.
>>
>> Let me know. I can definitely pick this up for fixing.
>>
>> Thanks,
>> Rahul
>>
>>
>>
>> On Tue, Apr 30, 2013 at 5:24 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>>
>>> On Tue, 30 Apr 2013, Rahul R wrote:
>>>
>>> While i was trying to upload data to cloud, i saw the error "HTTP error
>>>> before end of send, stop sending" in curl debug logs.
>>>>
>>>> In my code i am checking for the error code returned by
>>>> curl_easy_perform(). If it's not CURLE_OK, only then this will be treated
>>>> as error. In this case, the curl_easy_perform is returning CURLE_OK, hence
>>>> the error could not be detected by my code.
>>>>
>>>
>>> Hm, if the transfer was indeed aborted prematurely then we should
>>> consider to return some kind of error code to help the application to
>>> realize this.
>>>
>>> Can you help us fix this?
>>>
>>> --
>>>
>>> / daniel.haxx.se
>>> ------------------------------**------------------------------**-------
>>> List admin: http://cool.haxx.se/list/**listinfo/curl-library<http://cool.haxx.se/list/listinfo/curl-library>
>>> Etiquette: http://curl.haxx.se/mail/**etiquette.html<http://curl.haxx.se/mail/etiquette.html>
>>>
>>
>>
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-05-02