Date: Fri, 2 May 1997 16:57:51 -0700 (PDT) From: Dean Gaudet To: johnh Subject: http://gost.isi.edu/~johnh/SOFTWARE/APACHE/index.html Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Just wandering your pages again. Here's some notes you might want to add to the above link. It's stuff that all server developers will probably have to go through at some point. The short-initial-segment problem is definately fixed in Apache 1.2 as of 1.2b7. Something like this: All existing flushes were removed. When the server is reading a request line (GET /foobar HTTP/x.y) it will flush output if select() indicates that a read() would block. This was chosen as a solution that works with both pipelining and non-pipelining persistant clients. A non-pipelining client, and pipelining clients without any outstanding requests both require the flush at this point. A pipelining client with outstanding requests doesn't need the flush. This solution also avoids any need to keep timers and flush after a certain amount of time has passed. One thing to watch out for here is that clients send an extra CRLF after a POST request because the CERN webserver require it. So the server has to eat all CRLFs that appear before a request. The original reason earlier versions of Apache flushed after the http response headers was to work around a browser bug involving keepalive. Probably in Navigator version 2, for which we now disable all keepalive in the default configuration. Subsequent to removing the flush we discovered another Navigator bug present in all versions to at least 4.0b2. If the trailing CRLF of the http response header fall at the 256th or 257th byte of a "packet" then navigator will misinterpret the headers (and corrupt the result). It's hard to say exactly what goes wrong, we guess their initial read of a new request is into a 256 byte buffer and further reads are in a larger buffer. In any event apache detects this condition and adds a small padding header to force the trailing CRLF to be further into the packet. Dean