| Index: net/spdy/spdy_http_utils.cc
|
| diff --git a/net/spdy/spdy_http_utils.cc b/net/spdy/spdy_http_utils.cc
|
| index 7bf46b614e3cfd455fe0829da9b359a4eee4ad6d..573bce18b8f893b1ba15fb0fa8c5dd759ea625db 100644
|
| --- a/net/spdy/spdy_http_utils.cc
|
| +++ b/net/spdy/spdy_http_utils.cc
|
| @@ -7,6 +7,7 @@
|
| #include <string>
|
|
|
| #include "base/strings/string_number_conversions.h"
|
| +#include "base/strings/string_split.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/time/time.h"
|
| #include "net/base/escape.h"
|
| @@ -192,6 +193,22 @@ NET_EXPORT_PRIVATE RequestPriority ConvertSpdyPriorityToRequestPriority(
|
| IDLE : static_cast<RequestPriority>(4 - priority);
|
| }
|
|
|
| +NET_EXPORT_PRIVATE void ConvertHeaderBlockToHttpRequestHeaders(
|
| + const SpdyHeaderBlock& spdy_headers,
|
| + HttpRequestHeaders* http_headers) {
|
| + for (const auto& it : spdy_headers) {
|
| + base::StringPiece key = it.first;
|
| + if (key[0] == ':') {
|
| + key.remove_prefix(1);
|
| + }
|
| + std::vector<base::StringPiece> values = base::SplitStringPiece(
|
| + it.second, "\0", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
|
| + for (const auto& value : values) {
|
| + http_headers->SetHeader(key, value);
|
| + }
|
| + }
|
| +}
|
| +
|
| GURL GetUrlFromHeaderBlock(const SpdyHeaderBlock& headers,
|
| SpdyMajorVersion protocol_version) {
|
| SpdyHeaderBlock::const_iterator it = headers.find(":scheme");
|
|
|