You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/09/12 08:27:05 UTC

[trafficserver] 05/05: Fix dup header name bug in QPACK test driver

This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 00397dfa42846b68f9e4b6345e656e3e35151ce9
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Wed Sep 12 17:21:40 2018 +0900

    Fix dup header name bug in QPACK test driver
---
 proxy/hq/test/test_QPACK.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/proxy/hq/test/test_QPACK.cc b/proxy/hq/test/test_QPACK.cc
index 81b6971..d1906e2 100644
--- a/proxy/hq/test/test_QPACK.cc
+++ b/proxy/hq/test/test_QPACK.cc
@@ -132,7 +132,9 @@ load_qif_file(const char *filename, HTTPHdr **headers)
       auto tab   = line.find_first_of('\t');
       auto name  = line.substr(0, tab);
       auto value = line.substr(tab + 1);
-      hdr->value_set(name.c_str(), tab, value.c_str(), line.length() - tab - 1);
+      auto field = hdr->field_create(name.c_str(), tab);
+      hdr->field_attach(field);
+      hdr->field_value_set(field, value.c_str(), line.length() - tab - 1);
     }
   }
   if (hdr) {