httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Gutierrez <a...@blogometer.com>
Subject Re: mod_proxy buffering small chunks
Date Thu, 16 Feb 2006 16:25:43 GMT
* Alan Gutierrez <alan@blogometer.com> [2006-02-13 15:48]:
> * Plüm, Rüdiger, VIS <ruediger.pluem@vodafone.com> [2006-02-06 09:29]:
> > 
> > 
> > > -----Ursprüngliche Nachricht-----
> > > Von: Alan Gutierrez 
> > > 
> > > The proposed solution is to poll for chunks using 
> > > non-blocking I/O. When the socket returns EAGAIN, the 8K 
> > > buffer is flushed, and the socket is read with blocking I/O.
> > 
> > Thats the way the code is already designed in 2.2.x.
> 
> I am aware of this, acutally. I should have noted this myself.
> 
> I've traced through the code to see where the EAGAIN return value is
> lost, and to note that the non-blocking mode is not applied to the
> header. I've not tested, but I suspect that the logic is correctly
> implemented should the socket block during the transfer of the body
> of a chunk. It fails when the next chunk has not been sent.
> 
> 
> > > However, in the http code, regardless of the block mode flag, 
> > > the headers are read using blocking I/O. Furthermore, 
> > > somewhere deeper in the chain, when EAGAIN is detected the 
> > > success flag is returned instead. I'll provide more detail, 
> > > if this is not already well known.
> 
> > This is the problem. The EAGAIN or better the mode handling in this
> > code path is somewhat broken.
> 
> Looks that way. The EAGAIN is never sent back out, and in addition
> the headers are read with a blocking read. It would require changing
> the return values of code path, which may way cause some breakage.
> 
> Maybe not, if EAGAIN is handled correctly in all places, but it's
> never been tested, since it's never returned, right?
> 
> > > Looks like this is going to be messy to fix. Any patches?
> > 
> > Not so far. I guess it requires some general changes that must
> > be carefully designed. But anyway, patch proposals are welcome :-).
> 
> Can I suggest a flag? Something like
> 
> ProxyChunkedAsIs On

What does anyone think?


--
Alan Gutierrez - 504 717 1428 - alan@blogometer.com - http://blogometer.com/

Mime
View raw message