]> git.kaiwu.me - nginx.git/commitdiff
QUIC: logging of CRYPTO frame payload under NGX_QUIC_DEBUG_FRAMES.
authorSergey Kandaurov <pluknet@nginx.com>
Thu, 2 Dec 2021 10:59:56 +0000 (13:59 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Thu, 2 Dec 2021 10:59:56 +0000 (13:59 +0300)
src/event/quic/ngx_event_quic_frames.c

index 8d9fe24c22ef4a5cb02b1050c35d46e3f1fabef8..4a3902f7f72b676cd9fc15e5b407aeb99b5693d9 100644 (file)
@@ -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: