summaryrefslogtreecommitdiff
path: root/src/http_header.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-07-30 07:38:14 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2020-10-03 09:05:38 -0400
commit517e32785eec9333a93e1eb5f8bf3165ab7274ef (patch)
tree4cde877ae01363d29bac8b7a2a4becf61e573ae3 /src/http_header.c
parent4e656f53545ceb8b809a91283eb12e332826ca1d (diff)
downloadlighttpd-git-517e32785eec9333a93e1eb5f8bf3165ab7274ef.tar.gz
[core] HTTP2-Settings
Diffstat (limited to 'src/http_header.c')
-rw-r--r--src/http_header.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/http_header.c b/src/http_header.c
index 238e2643..9a52a1b6 100644
--- a/src/http_header.c
+++ b/src/http_header.c
@@ -26,7 +26,7 @@ typedef struct keyvlenvalue {
/* Note: must be kept in sync http_headers[] and http_headers_off[] */
/* http_headers_off lists first offset at which string of specific len occur */
int8_t http_headers_off[] = {
- -1, -1, -1, -1, 0, 4, 5, 9, 10, 11, 12, -1, 15, 16, 20, 21, 23, 25
+ -1, -1, -1, -1, 0, 4, 5, 9, 10, 11, 12, -1, 15, 16, 20, 22, 24, 26
};
static const keyvlenvalue http_headers[] = {
{ HTTP_HEADER_HOST, CONST_LEN_STR("Host") }
@@ -50,6 +50,7 @@ static const keyvlenvalue http_headers[] = {
,{ HTTP_HEADER_IF_NONE_MATCH, CONST_LEN_STR("If-None-Match") }
,{ HTTP_HEADER_CACHE_CONTROL, CONST_LEN_STR("Cache-Control") }
,{ HTTP_HEADER_CONTENT_LENGTH, CONST_LEN_STR("Content-Length") }
+ ,{ HTTP_HEADER_HTTP2_SETTINGS, CONST_LEN_STR("HTTP2-Settings") }
,{ HTTP_HEADER_ACCEPT_ENCODING, CONST_LEN_STR("Accept-Encoding") }
,{ HTTP_HEADER_X_FORWARDED_FOR, CONST_LEN_STR("X-Forwarded-For") }
,{ HTTP_HEADER_CONTENT_ENCODING, CONST_LEN_STR("Content-Encoding") }
@@ -85,6 +86,7 @@ int http_header_str_contains_token (const char * const s, const uint32_t slen, c
{
/*if (slen < mlen) return 0;*//*(possible optimizations for caller)*/
/*if (slen == mlen && buffer_eq_icase_ssn(s, m, mlen)) return 1;*/
+ /*(note: does not handle quoted-string)*/
uint32_t i = 0;
do {
while (i < slen && (s[i]==' ' || s[i]=='\t' || s[i]==',')) ++i;