]> git.kaiwu.me - nginx.git/commitdiff
HTTP/3: do not set the never-indexed literal bit by default.
authorRoman Arutyunyan <arut@nginx.com>
Mon, 31 Aug 2020 15:42:26 +0000 (18:42 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Mon, 31 Aug 2020 15:42:26 +0000 (18:42 +0300)
The "Literal Header Field Never Indexed" header field representation is not
used in HTTP/2, and it makes little sense to make a distinction in HTTP/3.

src/http/v3/ngx_http_v3_encode.c

index a80310fafbbfb0caa77a01482b4e4299d24036a4..b7bc3dd7c0c3425e416fb224c0962aa9e727fb08 100644 (file)
@@ -145,7 +145,7 @@ ngx_http_v3_encode_header_lri(u_char *p, ngx_uint_t dynamic, ngx_uint_t index,
                + len;
     }
 
-    *p = dynamic ? 0x60 : 0x70;
+    *p = dynamic ? 0x40 : 0x50;
     p = (u_char *) ngx_http_v3_encode_prefix_int(p, index, 4);
 
     *p = 0;
@@ -171,7 +171,7 @@ ngx_http_v3_encode_header_l(u_char *p, ngx_str_t *name, ngx_str_t *value)
                + value->len;
     }
 
-    *p = 0x30;
+    *p = 0x20;
     p = (u_char *) ngx_http_v3_encode_prefix_int(p, name->len, 3);
 
     ngx_strlow(p, name->data, name->len);
@@ -213,7 +213,7 @@ ngx_http_v3_encode_header_lpbi(u_char *p, ngx_uint_t index, u_char *data,
                + len;
     }
 
-    *p = 0x08;
+    *p = 0;
     p = (u_char *) ngx_http_v3_encode_prefix_int(p, index, 3);
 
     *p = 0;