comparison src/event/quic/ngx_event_quic_frames.c @ 9019:def8e398d7c5 quic

QUIC: fixed broken token in NEW_TOKEN (ticket #2446). Previously, since 3550b00d9dc8, the token was allocated on stack, to get rid of pool usage. Now the token is allocated by ngx_quic_copy_buffer() in QUIC buffers, also used for STREAM, CRYPTO and ACK frames.
author Roman Arutyunyan <arut@nginx.com>
date Tue, 31 Jan 2023 15:26:33 +0400
parents 3c98fa8fef6f
children 8f2f40d3fd18
comparison
equal deleted inserted replaced
9018:3c98fa8fef6f 9019:def8e398d7c5
856 f->u.path_challenge.data); 856 f->u.path_challenge.data);
857 break; 857 break;
858 858
859 case NGX_QUIC_FT_NEW_TOKEN: 859 case NGX_QUIC_FT_NEW_TOKEN:
860 p = ngx_slprintf(p, last, "NEW_TOKEN"); 860 p = ngx_slprintf(p, last, "NEW_TOKEN");
861
862 #ifdef NGX_QUIC_DEBUG_FRAMES
863 {
864 ngx_chain_t *cl;
865
866 p = ngx_slprintf(p, last, " token:");
867
868 for (cl = f->data; cl; cl = cl->next) {
869 p = ngx_slprintf(p, last, "%*xs",
870 cl->buf->last - cl->buf->pos, cl->buf->pos);
871 }
872 }
873 #endif
874
861 break; 875 break;
862 876
863 case NGX_QUIC_FT_HANDSHAKE_DONE: 877 case NGX_QUIC_FT_HANDSHAKE_DONE:
864 p = ngx_slprintf(p, last, "HANDSHAKE DONE"); 878 p = ngx_slprintf(p, last, "HANDSHAKE DONE");
865 break; 879 break;