Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1084)

Unified Diff: net/http/http_network_transaction.cc

Issue 2849193002: Revert "Do not abort redirect responses with unadvertised encoding." (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 2db34f14e62640af44d66da2a056c1f5502deb5a..fbdf5cef4e83b5f3f80eac1bc7dcfab1ad34fd64 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1801,7 +1801,6 @@ 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);
@@ -1809,21 +1808,11 @@ bool HttpNetworkTransaction::ContentEncodingsValid() const {
if (source_type == SourceStream::TYPE_UNKNOWN)
continue;
if (allowed_encodings.find(encoding) == allowed_encodings.end()) {
- FilterSourceStream::ReportContentDecodingFailed(
- SourceStream::TYPE_REJECTED);
- result = false;
- break;
+ FilterSourceStream::ReportContentDecodingFailed(source_type);
+ return false;
}
}
-
- // Temporary workaround for http://crbug.com/714514
- if (headers->IsRedirect(nullptr)) {
- UMA_HISTOGRAM_BOOLEAN("Net.RedirectWithUnadvertisedContentEncoding",
- !result);
- return true;
- }
-
- return result;
+ return true;
}
} // namespace net
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698