Commit aa1c8d1f authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Don't forward Trailer header field

parent 1de20c12
......@@ -20,6 +20,7 @@ HEADERS = [
"alt-svc",
"content-length",
"location",
"trailer",
# disallowed h1 headers
'connection',
'keep-alive',
......
......@@ -239,6 +239,7 @@ void copy_headers_to_nva(std::vector<nghttp2_nv> &nva, const Headers &headers) {
case HD_KEEP_ALIVE:
case HD_PROXY_CONNECTION:
case HD_SERVER:
case HD_TRAILER:
case HD_TRANSFER_ENCODING:
case HD_UPGRADE:
case HD_VIA:
......@@ -263,6 +264,7 @@ void build_http1_headers_from_headers(std::string &hdrs,
case HD_KEEP_ALIVE:
case HD_PROXY_CONNECTION:
case HD_SERVER:
case HD_TRAILER:
case HD_UPGRADE:
case HD_VIA:
case HD_X_FORWARDED_FOR:
......@@ -506,6 +508,11 @@ int lookup_token(const uint8_t *name, size_t namelen) {
return HD_UPGRADE;
}
break;
case 'r':
if (util::streq("traile", name, 6)) {
return HD_TRAILER;
}
break;
case 's':
if (util::streq(":statu", name, 6)) {
return HD__STATUS;
......
......@@ -203,6 +203,7 @@ enum {
HD_PROXY_CONNECTION,
HD_SERVER,
HD_TE,
HD_TRAILER,
HD_TRANSFER_ENCODING,
HD_UPGRADE,
HD_VIA,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment