read request body with http2

Ansuel nginx-forum at forum.nginx.org
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 
ngx_http_test_read_req

  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: https://forum.nginx.org/read.php?2,285859,285870#msg-285870



More information about the nginx mailing list