From 4042ff0fc408ab43109c679579a5a73a67e216d9 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 25 Mar 2015 01:17:06 +0900 Subject: [PATCH] nghttpx: Fix te header field is duplicated when forwarding HTTP/2 backend --- src/http2.cc | 1 + src/http2_test.cc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/http2.cc b/src/http2.cc index 633c3c4d..5fc50683 100644 --- a/src/http2.cc +++ b/src/http2.cc @@ -230,6 +230,7 @@ void copy_headers_to_nva(std::vector &nva, const Headers &headers) { case HD_KEEP_ALIVE: case HD_PROXY_CONNECTION: case HD_SERVER: + case HD_TE: case HD_TRANSFER_ENCODING: case HD_UPGRADE: case HD_VIA: diff --git a/src/http2_test.cc b/src/http2_test.cc index 3ea950a6..01a2bc50 100644 --- a/src/http2_test.cc +++ b/src/http2_test.cc @@ -153,8 +153,8 @@ auto headers = void test_http2_copy_headers_to_nva(void) { std::vector nva; http2::copy_headers_to_nva(nva, headers); - CU_ASSERT(9 == nva.size()); - auto ans = std::vector{0, 1, 4, 5, 6, 7, 8, 9, 12}; + CU_ASSERT(7 == nva.size()); + auto ans = std::vector{0, 1, 4, 5, 6, 7, 12}; for (size_t i = 0; i < ans.size(); ++i) { check_nv(headers[ans[i]], &nva[i]);