[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] http-client doesn't handle closed persistent connect
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] http-client doesn't handle closed persistent connections |
Date: |
Sun, 30 Jan 2011 14:12:36 +0100 |
User-agent: |
Mutt/1.4.2.3i |
On Sun, Jan 30, 2011 at 09:57:47PM +0900, Daishi Kato wrote:
> > A test case would be welcome.
>
> Here is how to reproduce the problem.
>
> #;2> (string-length (with-input-from-request "http://www.apache.org/" #f
> read-string))
> 44138
>
> This apache server is probably configured to keep connections for 5sec.
> The unofficial keep-alive header says so.
> I could confirm that the connection is closed after 5sec by netstat.
Excellent! Thank you for this test case. It appears to be very simple;
when the remote end drops the connection, the input port is _not_
automatically closed. Reading from it returns #!eof though, so I now
added a peek-char call to the connection status check, which seems to
fix the problem.
Could you (and Thomas, too) try http-client trunk and let me know if
everything is working out now? I'll make a new release if it works now.
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
- [Chicken-users] http-client doesn't handle closed persistent connections, Daishi Kato, 2011/01/29
- Re: [Chicken-users] http-client doesn't handle closed persistent connections, Peter Bex, 2011/01/29
- Re: [Chicken-users] http-client doesn't handle closed persistent connections, Thomas Hintz, 2011/01/29
- Re: [Chicken-users] http-client doesn't handle closed persistent connections, Daishi Kato, 2011/01/30
- Re: [Chicken-users] http-client doesn't handle closed persistent connections,
Peter Bex <=
- Re: [Chicken-users] http-client doesn't handle closed persistent connections, Daishi Kato, 2011/01/31
- Re: [Chicken-users] http-client doesn't handle closed persistent connections, Peter Bex, 2011/01/31
- Re: [Chicken-users] http-client doesn't handle closed persistent connections, Daishi Kato, 2011/01/31
- Re: [Chicken-users] http-client doesn't handle closed persistent connections, Peter Bex, 2011/01/31
- Re: [Chicken-users] http-client doesn't handle closed persistent connections, Daishi Kato, 2011/01/31