Received: by taz.hyperreal.com (8.8.3/V2.0) id UAA11397; Sat, 21 Dec 1996 20:42:16 -0800 (PST) Received: from eat.organic.com by taz.hyperreal.com (8.8.3/V2.0) with ESMTP id UAA11392; Sat, 21 Dec 1996 20:42:13 -0800 (PST) Received: from localhost (brian@localhost) by eat.organic.com (8.8.3/8.6.12) with SMTP id UAA01721; Sat, 21 Dec 1996 20:43:04 -0800 (PST) Date: Sat, 21 Dec 1996 20:43:03 -0800 (PST) From: Brian Behlendorf To: rasmus@mail1.bellglobal.com, new-httpd@hyperreal.com cc: David J MacKenzie Subject: Re: apache Timeout inconsistencies In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com On Tue, 17 Dec 1996 rasmus@mail1.bellglobal.com wrote: > > *) 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. I think it would be much better to put this inside the API rather than require API authors to remember to do it. Can't it sit inside get_client_block and still not check for each byte read? Brian --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-- brian@organic.com www.apache.org hyperreal.com http://www.organic.com/JOBS