]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ngtcp2: use token when detecting :status header field
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
Tue, 5 Apr 2022 14:48:44 +0000 (16:48 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 5 Apr 2022 14:48:44 +0000 (16:48 +0200)
Closes #8679

lib/vquic/ngtcp2.c

index 5c865ba2b01472d749c3318a8dcc206330b08925..1d73e27d0b00d1a4d066846e77dcd5bfd2a099a5 100644 (file)
@@ -1123,8 +1123,7 @@ static int cb_h3_recv_header(nghttp3_conn *conn, int64_t stream_id,
   (void)flags;
   (void)user_data;
 
-  if(h3name.len == sizeof(H2H3_PSEUDO_STATUS) - 1 &&
-     !memcmp(H2H3_PSEUDO_STATUS, h3name.base, h3name.len)) {
+  if(token == NGHTTP3_QPACK_TOKEN__STATUS) {
     char line[14]; /* status line is always 13 characters long */
     size_t ncopy;
     int status = decode_status_code(h3val.base, h3val.len);