httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ras...@mail1.bellglobal.com
Subject Re: apache Timeout inconsistencies
Date Tue, 17 Dec 1996 23:30:40 GMT
>   *) Reset timeout while reading via get_client_block() in mod_cgi.c
>      Fixes problem with timed out transfers of large files. [Rasmus
> Lerdorf] 
> 
> Coming soon to a 1.2b3 near you. :-)

Well, perhaps David's point is valid.  What if a single 8K buffer takes
more time to transfer than what the timeout is set for?  The fix I
made to mod_cgi.c simply resets the timer every time an 8K buffer is
read.  If a single 8K buffer takes longer than whatever the timeout is
set to, the connection will still time out.  Then again, the default
configured value for the timeout is 400 seconds.  If it takes longer than
400 seconds to send 8K, perhaps the connection should time out.

I actually looked at putting the timer reset right into the read_client_block
function, but for performance reasons we obviously do not want to call it
for every byte received.  I figure it was more appropriate to apply the
timeout to a block as a whole.  This should be documented though.  If
nowhere else, then in the comment in http_protocol.c such that future
module writers don't get this wrong.  

-Rasmus

Mime
View raw message