nghttpx: Fix te header field is duplicated when forwarding HTTP/2 backend
This commit is contained in:
parent
d3d6c5e314
commit
4042ff0fc4
|
@ -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 =
|
||||||
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]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue