chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] http-client doesn't handle closed persistent connect


From: Daishi Kato
Subject: Re: [Chicken-users] http-client doesn't handle closed persistent connections
Date: Mon, 31 Jan 2011 21:10:14 +0900
User-agent: Wanderlust/2.14.0 (Africa) Emacs/21.4 Mule/5.0 (SAKAKI)

At Sun, 30 Jan 2011 14:12:36 +0100,
Peter Bex wrote:
> 
> 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.

Hm, it avoids the problem, which is good.
However, it now doesn't keep connections.
In the case of www.apache.org, if you call http requests
twice in 5sec, the connection should be reused.
This was working with the released egg, but
it doesn't work with the trunk, which means
it creates a new connection even within 5sec.

Best,
Daishi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]