cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: re-using old HTTP connection causes empty reply

From: Philippe Raoult <phir_at_gcu-squad.org>
Date: Mon, 12 May 2003 19:20:13 +0200

On Mon, 12 May 2003 13:12:58 -0400
Dan Halbert <halbert_at_bbn.com> wrote:

> I am not sure this is a libcurl problem per se, but may be a network,
> socket, or perhaps webserver problem.
>
> This is a case where trying to reuse an old connection causes an
> "empty reply" instead of an I/O error. Have any of you seen this
> before?

i think this happens when the peer has cleanly reset the connection
(as opposed to a real IO error). libc functions tend to return 0 in this
case instead of -1 and confuse code built like
if(read(...) < 0)
        error();

regards,
Philippe

-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
Received on 2003-05-12