read request body with http2

Ansuel nginx-forum at
Mon Oct 14 18:41:33 UTC 2019

this is what i have in the module handler function

rc = ngx_http_read_client_request_body(r, ngx_http_test_read_req);
		if (rc != NGX_OK && rc != NGX_AGAIN) {
			return rc;

And this is what i have in 

  char *buffer = ngx_pcalloc(r->pool, cglcf->req_len);

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;

Do you see anything wrong in how i access the request body?

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

More information about the nginx mailing list