]> git.kaiwu.me - nginx.git/commitdiff
HTTP/2: fix $bytes_sent variable.
authorPiotr Sikora <piotrsikora@google.com>
Sun, 26 Mar 2017 08:25:02 +0000 (01:25 -0700)
committerPiotr Sikora <piotrsikora@google.com>
Sun, 26 Mar 2017 08:25:02 +0000 (01:25 -0700)
Previously, its value accounted for payloads of HEADERS, CONTINUATION
and DATA frames, as well as frame headers of HEADERS and DATA frames,
but it didn't account for frame headers of CONTINUATION frames.

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

index 42fa0c50c4b56965658139aa756643689d5516ba..8080e831a90038ace091a04a1fe825fd9fc0bd4d 100644 (file)
@@ -769,6 +769,8 @@ ngx_http_v2_create_headers_frame(ngx_http_request_t *r, u_char *pos,
         rest -= frame_size;
 
         if (rest) {
+            frame->length += NGX_HTTP_V2_FRAME_HEADER_SIZE;
+
             type = NGX_HTTP_V2_CONTINUATION_FRAME;
             flags = NGX_HTTP_V2_NO_FLAG;
             continue;