Skip to content

Commit

Permalink
Add NGHTTP2_TOKEN__PROTOCOL
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Sep 23, 2018
1 parent ed7fabc commit 33f6e90
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions genlibtokenlookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
('keep-alive',None),
('proxy-connection', None),
('upgrade', None),
(':protocol', None),
]

def to_enum_hd(k):
Expand Down
9 changes: 9 additions & 0 deletions lib/nghttp2_hd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
1 change: 1 addition & 0 deletions lib/nghttp2_hd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 33f6e90

Please sign in to comment.