Commit 50b3d69b authored by jan.koester's avatar jan.koester
Browse files

test

parent ef92c6e1
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1617,7 +1617,11 @@ size_t libhttppp::HttpRequest::parseH2(const std::vector<hpack::HeaderField> &he
  };

  for (const auto &h : headers) {
    auto *hd = setHeaderData(h.name);
    // Use getHeaderData first so that duplicate headers (e.g. multiple
    // cookie fields per RFC 7540 §8.1.2.5) APPEND values instead of
    // clearing them.  Only create a new entry when the key is new.
    auto *hd = getHeaderData(h.name);
    if (!hd) hd = setHeaderData(h.name);
    if (!hd) continue;
    const std::string &val = h.value;
    size_t oldiv = 0, iv = 0;
@@ -1679,7 +1683,11 @@ size_t libhttppp::HttpRequest::parseH3(const std::vector<qpack::HeaderField> &he
  };

  for (const auto &h : headers) {
    auto *hd = setHeaderData(h.name);
    // Use getHeaderData first so that duplicate headers (e.g. multiple
    // cookie fields per RFC 9114 §4.3.1) APPEND values instead of
    // clearing them.  Only create a new entry when the key is new.
    auto *hd = getHeaderData(h.name);
    if (!hd) hd = setHeaderData(h.name);
    if (!hd) continue;
    const std::string &val = h.value;
    size_t oldiv = 0, iv = 0;