On 2022/08/11 23:11:11 +0200, Claudio Jeker <cje...@diehard.n-r-g.com> wrote: > On Thu, Aug 11, 2022 at 08:41:43PM +0200, Omar Polo wrote: > > On 2022/08/11 19:37:08 +0200, Claudio Jeker wrote: > > > Reading through the fcgi code of httpd I wonder if HEAD requests are > > > handled correctly. In server_fcgi_read() the function just returns when it > > > hits the HEAD case but I think this is not correct since it does not drain > > > the clt_srvevb buffer and it kind of ignores possible padding bytes. > > > > FWIW I was wondering the same but I think it's fine to `return' here. > > It's a small optimization: if we've reached FCGI_END_REQUEST there is > > no more to read and padding is very likely zero anyway. clt_srvevb is > > re-created on the next server_fcgi. > > I would like to have this fixed anyway. Ideally the connection would be > reused (also httpd would benefit from multiplexing but first slowcgi needs > to support that properly).
ah, haven't thought that the idea was to eventually support multiplexing. FWIW I agree that breaking out of the switch instead of exiting from the function is the correct thing to do: it allows to drain the bytes from the clt_srvevb, process eventually padding bytes and not going out of sync with the fastcgi application when it'll support multiplexing. OK op