Skip to content

Commit

Permalink
HTTP/2: fix $body_bytes_sent variable.
Browse files Browse the repository at this point in the history
Previously, its value included payloads and frame headers of HEADERS
and CONTINUATION frames.

Signed-off-by: Piotr Sikora <[email protected]>
  • Loading branch information
PiotrSikora committed Mar 26, 2017
1 parent 1506e43 commit d2008db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/http/v2/ngx_http_v2_filter_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d2008db

Please sign in to comment.