nghttpx: Don't forward Trailer header field
This commit is contained in:
parent
1de20c1232
commit
aa1c8d1fa4
|
@ -20,6 +20,7 @@ HEADERS = [
|
||||||
"alt-svc",
|
"alt-svc",
|
||||||
"content-length",
|
"content-length",
|
||||||
"location",
|
"location",
|
||||||
|
"trailer",
|
||||||
# disallowed h1 headers
|
# disallowed h1 headers
|
||||||
'connection',
|
'connection',
|
||||||
'keep-alive',
|
'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_KEEP_ALIVE:
|
||||||
case HD_PROXY_CONNECTION:
|
case HD_PROXY_CONNECTION:
|
||||||
case HD_SERVER:
|
case HD_SERVER:
|
||||||
|
case HD_TRAILER:
|
||||||
case HD_TRANSFER_ENCODING:
|
case HD_TRANSFER_ENCODING:
|
||||||
case HD_UPGRADE:
|
case HD_UPGRADE:
|
||||||
case HD_VIA:
|
case HD_VIA:
|
||||||
|
@ -263,6 +264,7 @@ void build_http1_headers_from_headers(std::string &hdrs,
|
||||||
case HD_KEEP_ALIVE:
|
case HD_KEEP_ALIVE:
|
||||||
case HD_PROXY_CONNECTION:
|
case HD_PROXY_CONNECTION:
|
||||||
case HD_SERVER:
|
case HD_SERVER:
|
||||||
|
case HD_TRAILER:
|
||||||
case HD_UPGRADE:
|
case HD_UPGRADE:
|
||||||
case HD_VIA:
|
case HD_VIA:
|
||||||
case HD_X_FORWARDED_FOR:
|
case HD_X_FORWARDED_FOR:
|
||||||
|
@ -506,6 +508,11 @@ int lookup_token(const uint8_t *name, size_t namelen) {
|
||||||
return HD_UPGRADE;
|
return HD_UPGRADE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'r':
|
||||||
|
if (util::streq("traile", name, 6)) {
|
||||||
|
return HD_TRAILER;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
if (util::streq(":statu", name, 6)) {
|
if (util::streq(":statu", name, 6)) {
|
||||||
return HD__STATUS;
|
return HD__STATUS;
|
||||||
|
|
|
@ -203,6 +203,7 @@ enum {
|
||||||
HD_PROXY_CONNECTION,
|
HD_PROXY_CONNECTION,
|
||||||
HD_SERVER,
|
HD_SERVER,
|
||||||
HD_TE,
|
HD_TE,
|
||||||
|
HD_TRAILER,
|
||||||
HD_TRANSFER_ENCODING,
|
HD_TRANSFER_ENCODING,
|
||||||
HD_UPGRADE,
|
HD_UPGRADE,
|
||||||
HD_VIA,
|
HD_VIA,
|
||||||
|
|
Loading…
Reference in New Issue