Patch: Refactor ngx_http_write_request_body into a filter

Maxim Dounin mdounin at mdounin.ru
Thu Jul 24 20:04:57 UTC 2014


Hello!

On Wed, Jul 23, 2014 at 10:57:41PM +0300, grrm grrm wrote:

> Hello, Maxim.
> I would like to invest some time into this. Do you point out any
> specific mistakes I made, or where code just doesn't look right? Or it
> is just that a move to the request filters would imply some design
> changes that would have to be considered more carefully?

In this particular patch you are trying to make a filter from the 
ngx_http_write_request_body() function, and you are moving 
existing save filter into it - instead of using already existing 
save filter, and using the ngx_http_write_request_body() in it.

> Although I didn't like setting flush in the request body read
> function, I saw that flush is set for all buffers in the proxy input
> filter for example in the non-buffered logic.

Unconditionally setting the flush flag looks wrong - in 
particular, this will cause unneeded flushes when sending large 
bodies over SSL connections.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list