Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: improved debugging of sending control frames.

Valentin Bartenev
March 21, 2016 10:06AM
details: http://hg.nginx.org/nginx/rev/4d1d3c2530e0
branches:
changeset: 6448:4d1d3c2530e0
user: Valentin Bartenev <vbart@nginx.com>
date: Mon Mar 21 17:04:21 2016 +0300
description:
HTTP/2: improved debugging of sending control frames.

diffstat:

src/http/v2/ngx_http_v2.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)

diffs (46 lines):

diff -r d17f0584006f -r 4d1d3c2530e0 src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c Mon Mar 21 12:36:36 2016 +0300
+++ b/src/http/v2/ngx_http_v2.c Mon Mar 21 17:04:21 2016 +0300
@@ -2503,8 +2503,8 @@ ngx_http_v2_send_settings(ngx_http_v2_co
ngx_http_v2_srv_conf_t *h2scf;
ngx_http_v2_out_frame_t *frame;

- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
- "http2 send SETTINGS frame");
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 send SETTINGS frame ack:%ui", ack);

frame = ngx_palloc(h2c->pool, sizeof(ngx_http_v2_out_frame_t));
if (frame == NULL) {
@@ -2595,6 +2595,10 @@ ngx_http_v2_send_window_update(ngx_http_
ngx_buf_t *buf;
ngx_http_v2_out_frame_t *frame;

+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 send WINDOW_UPDATE frame sid:%ui, window:%uz",
+ sid, window);
+
frame = ngx_http_v2_get_frame(h2c, NGX_HTTP_V2_WINDOW_UPDATE_SIZE,
NGX_HTTP_V2_WINDOW_UPDATE_FRAME,
NGX_HTTP_V2_NO_FLAG, sid);
@@ -2619,6 +2623,10 @@ ngx_http_v2_send_rst_stream(ngx_http_v2_
ngx_buf_t *buf;
ngx_http_v2_out_frame_t *frame;

+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 send RST_STREAM frame sid:%ui, status:%uz",
+ sid, status);
+
frame = ngx_http_v2_get_frame(h2c, NGX_HTTP_V2_RST_STREAM_SIZE,
NGX_HTTP_V2_RST_STREAM_FRAME,
NGX_HTTP_V2_NO_FLAG, sid);
@@ -2642,6 +2650,9 @@ ngx_http_v2_send_goaway(ngx_http_v2_conn
ngx_buf_t *buf;
ngx_http_v2_out_frame_t *frame;

+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
+ "http2 send GOAWAY frame, status:%uz", status);
+
frame = ngx_http_v2_get_frame(h2c, NGX_HTTP_V2_GOAWAY_SIZE,
NGX_HTTP_V2_GOAWAY_FRAME,
NGX_HTTP_V2_NO_FLAG, 0);

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] HTTP/2: improved debugging of sending control frames.

Valentin Bartenev 401 March 21, 2016 10:06AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 204
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready