[core] update cached tables with Priority header

(thx jens-maus)
master
Glenn Strauss 6 months ago
parent f20061e482
commit 5a32a6dc51
  1. 2
      src/h2.c
  2. 5
      src/http_header.c

@ -66,6 +66,7 @@ static const char http_header_lc[][32] = {
,[HTTP_HEADER_ONION_LOCATION] = "onion-location"
,[HTTP_HEADER_P3P] = "p3p"
,[HTTP_HEADER_PRAGMA] = "pragma"
,[HTTP_HEADER_PRIORITY] = "priority"
,[HTTP_HEADER_RANGE] = "range"
,[HTTP_HEADER_REFERER] = "referer"
,[HTTP_HEADER_REFERRER_POLICY] = "referrer-policy"
@ -148,6 +149,7 @@ static const uint8_t http_header_lshpack_idx[] = {
,[HTTP_HEADER_ONION_LOCATION] = LSHPACK_HDR_UNKNOWN
,[HTTP_HEADER_P3P] = LSHPACK_HDR_UNKNOWN
,[HTTP_HEADER_PRAGMA] = LSHPACK_HDR_UNKNOWN
,[HTTP_HEADER_PRIORITY] = LSHPACK_HDR_UNKNOWN
,[HTTP_HEADER_REFERER] = LSHPACK_HDR_REFERER
,[HTTP_HEADER_REFERRER_POLICY] = LSHPACK_HDR_UNKNOWN
,[HTTP_HEADER_STRICT_TRANSPORT_SECURITY] = LSHPACK_HDR_STRICT_TRANSPORT_SECURITY

@ -29,8 +29,8 @@ typedef struct keyvlenvalue {
/* Note: must be kept in sync h2.c:lshpack_idx_http_header[] */
/* http_headers_off lists first offset at which string of specific len occur */
static const int8_t http_headers_off[] = {
-1, -1, 0, 1, 4, 9, 11, 17, 21, 25, 27, -1, 30, 31,
37, 40, 45, 49, -1, 52, -1, -1, 53, 54, -1, 55, -1, 57
-1, -1, 0, 1, 4, 9, 11, 17, 21, 26, 28, -1, 31, 32,
38, 41, 46, 50, -1, 53, -1, -1, 54, 55, -1, 56, -1, 58
};
static const keyvlenvalue http_headers[] = {
{ HTTP_HEADER_TE, CONST_LEN_STR("te") }
@ -55,6 +55,7 @@ static const keyvlenvalue http_headers[] = {
,{ HTTP_HEADER_EXPIRES, CONST_LEN_STR("expires") }
,{ HTTP_HEADER_ALT_SVC, CONST_LEN_STR("alt-svc") }
,{ HTTP_HEADER_LOCATION, CONST_LEN_STR("location") }
,{ HTTP_HEADER_PRIORITY, CONST_LEN_STR("priority") }
,{ HTTP_HEADER_IF_MATCH, CONST_LEN_STR("if-match") }
,{ HTTP_HEADER_IF_RANGE, CONST_LEN_STR("if-range") }
,{ HTTP_HEADER_ALT_USED, CONST_LEN_STR("alt-used") }

Loading…
Cancel
Save