Commit 4042ff0f authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Fix te header field is duplicated when forwarding HTTP/2 backend

parent d3d6c5e3
...@@ -230,6 +230,7 @@ void copy_headers_to_nva(std::vector<nghttp2_nv> &nva, const Headers &headers) { ...@@ -230,6 +230,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_TE:
case HD_TRANSFER_ENCODING: case HD_TRANSFER_ENCODING:
case HD_UPGRADE: case HD_UPGRADE:
case HD_VIA: case HD_VIA:
......
...@@ -153,8 +153,8 @@ auto headers = ...@@ -153,8 +153,8 @@ auto headers =
void test_http2_copy_headers_to_nva(void) { void test_http2_copy_headers_to_nva(void) {
std::vector<nghttp2_nv> nva; std::vector<nghttp2_nv> nva;
http2::copy_headers_to_nva(nva, headers); http2::copy_headers_to_nva(nva, headers);
CU_ASSERT(9 == nva.size()); CU_ASSERT(7 == nva.size());
auto ans = std::vector<int>{0, 1, 4, 5, 6, 7, 8, 9, 12}; auto ans = std::vector<int>{0, 1, 4, 5, 6, 7, 12};
for (size_t i = 0; i < ans.size(); ++i) { for (size_t i = 0; i < ans.size(); ++i) {
check_nv(headers[ans[i]], &nva[i]); check_nv(headers[ans[i]], &nva[i]);
......
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