| Index: net/http/http_network_transaction.cc
|
| diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
|
| index fbdf5cef4e83b5f3f80eac1bc7dcfab1ad34fd64..2db34f14e62640af44d66da2a056c1f5502deb5a 100644
|
| --- a/net/http/http_network_transaction.cc
|
| +++ b/net/http/http_network_transaction.cc
|
| @@ -1801,6 +1801,7 @@ bool HttpNetworkTransaction::ContentEncodingsValid() const {
|
| if (allowed_encodings.find("*") != allowed_encodings.end())
|
| return true;
|
|
|
| + bool result = true;
|
| for (auto const& encoding : used_encodings) {
|
| SourceStream::SourceType source_type =
|
| FilterSourceStream::ParseEncodingType(encoding);
|
| @@ -1808,11 +1809,21 @@ bool HttpNetworkTransaction::ContentEncodingsValid() const {
|
| if (source_type == SourceStream::TYPE_UNKNOWN)
|
| continue;
|
| if (allowed_encodings.find(encoding) == allowed_encodings.end()) {
|
| - FilterSourceStream::ReportContentDecodingFailed(source_type);
|
| - return false;
|
| + FilterSourceStream::ReportContentDecodingFailed(
|
| + SourceStream::TYPE_REJECTED);
|
| + result = false;
|
| + break;
|
| }
|
| }
|
| - return true;
|
| +
|
| + // Temporary workaround for http://crbug.com/714514
|
| + if (headers->IsRedirect(nullptr)) {
|
| + UMA_HISTOGRAM_BOOLEAN("Net.RedirectWithUnadvertisedContentEncoding",
|
| + !result);
|
| + return true;
|
| + }
|
| +
|
| + return result;
|
| }
|
|
|
| } // namespace net
|
|
|