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

Unified Diff: net/filter/filter.cc

Issue 206503006: Fix content-encoding handling with buggy servers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 years, 9 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 | « net/filter/filter.h ('k') | net/filter/filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/filter/filter.cc
diff --git a/net/filter/filter.cc b/net/filter/filter.cc
index 244abaea10eead6e52ac95e5b52af3862c6f64ff..e45ff14a278c61122139132a02ffe370668687c4 100644
--- a/net/filter/filter.cc
+++ b/net/filter/filter.cc
@@ -170,10 +170,14 @@ void Filter::FixupEncodingTypes(
encoding_types->clear();
GURL url;
+ std::string server_filename;
success = filter_context.GetURL(&url);
DCHECK(success);
- base::FilePath filename =
- base::FilePath().AppendASCII(url.ExtractFileName());
+ base::FilePath filename;
+ if (filter_context.GetFilename(&server_filename))
+ filename = base::FilePath().AppendASCII(server_filename);
asanka 2014/03/20 23:07:16 Nit: server_filename is UTF-8, not necessarily ASC
+ else
+ filename = base::FilePath().AppendASCII(url.ExtractFileName());
base::FilePath::StringType extension = filename.Extension();
if (filter_context.IsDownload()) {
« no previous file with comments | « net/filter/filter.h ('k') | net/filter/filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698