summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2022-06-05 06:37:44 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2022-06-07 19:23:53 -0400
commit5a32a6dc518eccc784b87b6773e37edd28c1515d (patch)
tree45d77aabc5483990e78153fd031778543ffb2a4c
parentf20061e4821b61a22906a9d23d0d00f3ee992fd0 (diff)
downloadlighttpd-git-5a32a6dc518eccc784b87b6773e37edd28c1515d.tar.gz
[core] update cached tables with Priority header
(thx jens-maus)
-rw-r--r--src/h2.c2
-rw-r--r--src/http_header.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/h2.c b/src/h2.c
index 297bb719..b50b4719 100644
--- a/src/h2.c
+++ b/src/h2.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
diff --git a/src/http_header.c b/src/http_header.c
index d2ae6929..2b51e6d0 100644
--- a/src/http_header.c
+++ b/src/http_header.c
@@ -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") }