| Index: net/quic/spdy_utils.cc
|
| diff --git a/net/quic/spdy_utils.cc b/net/quic/spdy_utils.cc
|
| index bdb4a752ebdce67ec352a484644dbaa40de8a150..78f6e0b9b764091385f7869321bbbbb30e435f7c 100644
|
| --- a/net/quic/spdy_utils.cc
|
| +++ b/net/quic/spdy_utils.cc
|
| @@ -11,6 +11,7 @@
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/string_split.h"
|
| #include "base/strings/string_util.h"
|
| +#include "base/strings/stringprintf.h"
|
| #include "net/spdy/spdy_frame_builder.h"
|
| #include "net/spdy/spdy_framer.h"
|
| #include "net/spdy/spdy_protocol.h"
|
| @@ -125,12 +126,15 @@ bool SpdyUtils::CopyAndValidateHeaders(const QuicHeaderList& header_list,
|
| return false;
|
| }
|
|
|
| - if (headers->find(name) != headers->end()) {
|
| - DLOG(ERROR) << "Duplicate header '" << name << "' found.";
|
| - return false;
|
| + auto iter = headers->find(name);
|
| + if (iter == headers->end()) {
|
| + (*headers)[name] = p.second;
|
| + } else {
|
| + // This header had multiple values, so it must be reconstructed.
|
| + string value = base::StringPrintf(
|
| + "%s%c%s", iter->second.as_string().c_str(), '\0', p.second.c_str());
|
| + headers->ReplaceOrAppendHeader(name, value);
|
| }
|
| -
|
| - (*headers)[name] = p.second;
|
| }
|
|
|
| if (ContainsKey(*headers, "content-length")) {
|
|
|