[nginx-quic] fix qpack header null value issue

sun edward sunzhiyong3210 at gmail.com
Fri May 28 04:02:30 UTC 2021


description:
     when header with a null value,need to reset st->value,otherwise it is
taking previous header field's value

# HG changeset patch
# User Zhiyong Sun <sunzhiyong3210 at gmail.com>
# Date 1622174245 14400
#      Thu May 27 23:57:25 2021 -0400
# Branch quic
# Node ID 93a08c9a9d05a0ba529b369c741baa84defdd832
# Parent  e6c26cb4d38b8cecb89f26e002bfacf11eafe4a1
fix qpack null value issue,when header with a null value,need to reset
st->value,otherwise it is taking previous header field's value

diff -r e6c26cb4d38b -r 93a08c9a9d05 src/http/v3/ngx_http_v3_parse.c
--- a/src/http/v3/ngx_http_v3_parse.c   Thu May 27 13:29:00 2021 +0300
+++ b/src/http/v3/ngx_http_v3_parse.c   Thu May 27 23:57:25 2021 -0400
@@ -1470,6 +1470,8 @@

         st->literal.length = st->pint.value;
         if (st->literal.length == 0) {
+           st->value.len = 0;
+           st->value.data = NULL;
             goto done;
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20210528/27e8b8f6/attachment.htm>


More information about the nginx-devel mailing list