cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: "Connection Aborted" vs. "Empty reply from server"

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 25 Oct 2006 22:49:09 +0200 (CEST)

On Wed, 25 Oct 2006, Vinay Rai wrote:

> 1. My application using curl gets CURLOPT_ERRORBUFFER filled with "Empty
> reply from server" when I call curl_easy_setopt(s, CURLOPT_ERRORBUFFER,
> m_curlError).
>
> At some point, the customer used to get "Connection Aborted" error (I
> think for a similar scenario).

I find that highly unlikely. The "Empty reply from server" is when doing HTTP,
while the "Connection Aborted" (when it existed) was for FTP.

> Can someone let me know if "Connection Aborted" has replaced "Empty reply
> from server" sometime in recent past? I think the answer is yes, but want
> to know if curl now makes more fine grained distinction between what used to
> be generically treated as "Connection Aborted" earlier?

Nope, "Connection aborted" was replaced by "FTP response reading failed". And
this latter error message is still used for this situation.

Unless of course you're running on Windows (you didn't say) as then the error
might just be a connect error that returned WSAECONNABORTED and the error
text was brought by get_winsock_error() in lib/strerror.c.

> I find a reference to this in CHANGES.2003: from CHANGES.2003 -

...

> 2. I tried to find the answer myself by searching the code. I think that the
> call failf(data, "Empty reply from server"); in the function Curl_http_done
> in http.c file is responsible for filling in the CURLOPT_ERRORBUFFER.

Yes, for that particular error.

> However, when I did a cvs graph on this to find when the code was changed, I
> was disappointed. All dates were "1900/0/0 0:0:0" so I do not have any way
> to find this out.

Eh, all what dates? I can see dates back to 1999 perfectly fine on this page:
http://cool.haxx.se/cvs.cgi/curl/lib/http.c

But the reference you found from dec 8 2003 is as I mentioned a FTP-related
one, and was done like this:

         http://cool.haxx.se/cvs.cgi/curl/lib/ftp.c.diff?r1=1.216&r2=1.217

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-10-25