On Sun, 22 Feb 2004, Adrian Chadd wrote: > On Sun, Feb 22, 2004, Adrian Chadd wrote: > > On Mon, Feb 23, 2004, Henrik Nordstrom wrote: > > > On Sun, 22 Feb 2004, Adrian Chadd wrote: > > > > > > > * exports a commIfHalfClosed(fd) routine.. > > > > * .. which I then use in ConnStateData::readSomeData() to > > > > make 100% sure I'm not reading any data from that fd.. > > > > > > I would prefer if this done a little earlier, even prevening the attempt > > > of trying to read the next request. From a quick inspection this would be > > > in ConnStateData::readNextRequest. > > > > I can do that. I could even move it into keepaliveNextRequest().. > > .. which isn't "right". > > The trouble is this: what do we do if there's still data in the > conn in buf?
Right... Forgot about that buffer. This leaves us pretty much only with the choice of allowing repeated comm_read after eof, having comm_read immediately return a zero length read like how this was done in 2.5. If not the code path gets a little too messed up I am afraid. > Should we try to parse it and kick start it as another request? Yes. If you support half-closed connections then there is no reason why pipelining over the same should not be supported. > Or, do we just give up at this point and throw all the subsequent > requests away? If this is wanted then don't enable half-closed client support. Regards Henrik
