summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Sikora <piotrsikora@google.com>2017-03-26 01:25:03 -0700
committerPiotr Sikora <piotrsikora@google.com>2017-03-26 01:25:03 -0700
commitd2008dbc7d058cd88b1bd17f072d6300c0669b9f (patch)
tree7285a80a69dc48f5766a16e63896f2accffbd9df
parent1506e438cb6ea5b2a339a9d0f135eb8640549399 (diff)
downloadnginx-d2008dbc7d058cd88b1bd17f072d6300c0669b9f.tar.gz
HTTP/2: fix $body_bytes_sent variable.
Previously, its value included payloads and frame headers of HEADERS and CONTINUATION frames. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
-rw-r--r--src/http/v2/ngx_http_v2_filter_module.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/http/v2/ngx_http_v2_filter_module.c b/src/http/v2/ngx_http_v2_filter_module.c
index 8080e831a..dac50463e 100644
--- a/src/http/v2/ngx_http_v2_filter_module.c
+++ b/src/http/v2/ngx_http_v2_filter_module.c
@@ -1211,6 +1211,9 @@ ngx_http_v2_headers_frame_handler(ngx_http_v2_connection_t *h2c,
"http2:%ui HEADERS frame %p was sent",
stream->node->id, frame);
+ stream->request->header_size += NGX_HTTP_V2_FRAME_HEADER_SIZE
+ + frame->length;
+
ngx_http_v2_handle_frame(stream, frame);
ngx_http_v2_handle_stream(h2c, stream);