On 24/03/07, David Davis <[EMAIL PROTECTED]> wrote:
I used 'sudo ngrep port 32080' and watched ls /proc/<pid>/fd/ while I hit the http server. I noticed that the responses were HTTP/1.0 but I didn't see a connection: close header. So, I set $response->protocol( "HTTP/1.1" ); in the cookbook example, and the sockets didn't leak!
I think we have a few options 1) The server should assume connection: close if the protocol is < 1.1 and no keepalive is being used. 2) The PoCo could set HTTP/1.1 in the response by default. 3) both. I haven't dug any deeper yet, but it's a good start.
yesterday i had similar problem, ie app was running out of sockets (because PoCo server never closed them (or at least not soon after)). My solution was PostHandler enforcing Connection => 'Close', It even keeps them opened when calling aplication closes their socket and exits. I think when error handler in PoCo::Server::HTTP catches read/write error should mark that socket will be closed even if conection keepalive is in effect, because read/write error mean peer disconnected (and looks like thats mine case) test app in attachment. -- Maciej Pijanka, PLD-Linux Developer (lazy one) Registerd Linux user #133161 (as lazy as hell) A train station is where a train stops. A bus station is where a bus stops. On my desk I have a workstation...
PoCoServerHTTP_test.pl
Description: Binary data