read request body with http2

Ansuel nginx-forum at
Mon Oct 14 00:47:16 UTC 2019

Hello, i'm developing a custom module that needs to read the request body to
get some data from it. 
To read the request body i'm using 


and in the callback i use 

for (in = r->request_body->bufs; in; in = in->next) {
			len = ngx_buf_size(in->buf);
			ngx_memcpy(buffer + pos,in->buf->pos,len);
			pos += len;

To put the data in a char buffer

Aside from the fact that put request body in a buffer is wrong because it
can became very big...

I notice that if i enable http2 connection, the request body doesn't get
read at all.... I notice the function read_client_request_body is never
Am i missing something or there are some specail way to wait/read the
request body with http2? By disabling it (remove support from nginx.conf)
the module works as it should and i can correctly read the request body.

I really hope this can be solved as i don't want to remove http2 support for

Posted at Nginx Forum:,285859,285859#msg-285859

More information about the nginx mailing list