Patch: Refactor ngx_http_write_request_body into a filter

Maxim Dounin mdounin at
Fri Jun 20 18:09:26 UTC 2014


On Fri, Jun 20, 2014 at 12:56:33AM +0300, grrm grrm wrote:

> Hello,
> This patch removes some redundant ngx_http_request_body_filter calls,
> simplifies the ngx_http_do_read_client_request_body and
> ngx_http_read_client_request_body functions and removes some
> duplication of code.
> body.t and body_chunked.t test in nginx-tests are passing.
> Please kindly consider it.

It looks like the patch introduces at least one serious enough 
problem: with the patch, if disk buffering is used, all reads 
from a client are mapped into disk writes, which is bad.  Also, I 
don't think that it improves things from readability point of 

Maxim Dounin

More information about the nginx-devel mailing list