Closed e2dk4r closed 2 years ago
The reason this bug accours is request body rb->rest
is returning 1
when HTTP/2 is enabled.
You can find this in src/http/v2/ngx_http_v2.c
in ngx_http_v2_read_request_body
function on rb->rest = 1;
line.
ngx_int_t
ngx_http_v2_read_request_body(ngx_http_request_t *r)
{
off_t len;
size_t size;
ngx_buf_t *buf;
ngx_int_t rc;
ngx_http_v2_stream_t *stream;
ngx_http_v2_srv_conf_t *h2scf;
ngx_http_request_body_t *rb;
ngx_http_core_loc_conf_t *clcf;
ngx_http_v2_connection_t *h2c;
stream = r->stream;
rb = r->request_body;
if (stream->skip_data) {
r->request_body_no_buffering = 0;
rb->post_handler(r);
return NGX_OK;
}
rb->rest = 1;
...
this changes fix received value same as size value in responses when using HTTP/2
bug mentioned at masterzen/nginx-upload-progress-module#45