diff --git a/genlibtokenlookup.py b/genlibtokenlookup.py index 267a30b4..9477d07d 100755 --- a/genlibtokenlookup.py +++ b/genlibtokenlookup.py @@ -67,6 +67,7 @@ HEADERS = [ ('keep-alive',None), ('proxy-connection', None), ('upgrade', None), + (':protocol', None), ] def to_enum_hd(k): diff --git a/lib/nghttp2_hd.c b/lib/nghttp2_hd.c index 82cc23de..a61f0d47 100644 --- a/lib/nghttp2_hd.c +++ b/lib/nghttp2_hd.c @@ -271,6 +271,15 @@ static int32_t lookup_token(const uint8_t *name, size_t namelen) { break; } break; + case 9: + switch (name[8]) { + case 'l': + if (memeq(":protoco", name, 8)) { + return NGHTTP2_TOKEN__PROTOCOL; + } + break; + } + break; case 10: switch (name[9]) { case 'e': diff --git a/lib/nghttp2_hd.h b/lib/nghttp2_hd.h index c64a1f2b..14ae9807 100644 --- a/lib/nghttp2_hd.h +++ b/lib/nghttp2_hd.h @@ -111,6 +111,7 @@ typedef enum { NGHTTP2_TOKEN_KEEP_ALIVE, NGHTTP2_TOKEN_PROXY_CONNECTION, NGHTTP2_TOKEN_UPGRADE, + NGHTTP2_TOKEN__PROTOCOL, } nghttp2_token; struct nghttp2_hd_entry;