From bde585656a15bcde006862a407a83209d20f7c43 Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Thu, 2 Dec 2021 13:59:56 +0300 Subject: [PATCH] QUIC: logging of CRYPTO frame payload under NGX_QUIC_DEBUG_FRAMES. --- src/event/quic/ngx_event_quic_frames.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/event/quic/ngx_event_quic_frames.c b/src/event/quic/ngx_event_quic_frames.c index 8d9fe24c2..4a3902f7f 100644 --- a/src/event/quic/ngx_event_quic_frames.c +++ b/src/event/quic/ngx_event_quic_frames.c @@ -573,6 +573,20 @@ ngx_quic_log_frame(ngx_log_t *log, ngx_quic_frame_t *f, ngx_uint_t tx) case NGX_QUIC_FT_CRYPTO: p = ngx_slprintf(p, last, "CRYPTO len:%uL off:%uL", f->u.crypto.length, f->u.crypto.offset); + +#ifdef NGX_QUIC_DEBUG_FRAMES + { + ngx_chain_t *cl; + + p = ngx_slprintf(p, last, " data:"); + + for (cl = f->data; cl; cl = cl->next) { + p = ngx_slprintf(p, last, "%*xs", + cl->buf->last - cl->buf->pos, cl->buf->pos); + } + } +#endif + break; case NGX_QUIC_FT_PADDING: