]> git.kaiwu.me - nginx.git/commitdiff
HTTP/2: fix $body_bytes_sent variable.
authorPiotr Sikora <piotrsikora@google.com>
Sun, 26 Mar 2017 08:25:03 +0000 (01:25 -0700)
committerPiotr Sikora <piotrsikora@google.com>
Sun, 26 Mar 2017 08:25:03 +0000 (01:25 -0700)
Previously, its value included payloads and frame headers of HEADERS
and CONTINUATION frames.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
src/http/v2/ngx_http_v2_filter_module.c

index 8080e831a90038ace091a04a1fe825fd9fc0bd4d..dac50463e8103eb5c08e962a5942fff73aa87e6e 100644 (file)
@@ -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);