summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_http_job.cc
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-28 01:45:58 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-28 01:45:58 +0000
commit77e9fcf0815dbe8853a09b894560ba6c1feaf487 (patch)
tree9c3fbb9fb2e8d2cb7f011660888a34d8da4c7bf7 /net/url_request/url_request_http_job.cc
parenta6de74a24ad4aefee8e09a0a7a23dab4357e33c0 (diff)
downloadchromium_src-77e9fcf0815dbe8853a09b894560ba6c1feaf487.zip
chromium_src-77e9fcf0815dbe8853a09b894560ba6c1feaf487.tar.gz
chromium_src-77e9fcf0815dbe8853a09b894560ba6c1feaf487.tar.bz2
Facilitate SDCH content decoding after a proxy removes ALL content info
Some proxies remove all content-encoding information when they see that SDCH encoding was done. We had a premature optimization that only called for doing "fixups" of content encoding IF there was some content encoding. We need to do the fixups as needed even if the HTTP headers didn't supply any encodings (such as when a proxy or anti-virus software strips all encodings!) bug=9151 r=huanr,kmixter,openvcdiff Review URL: http://codereview.chromium.org/56034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_http_job.cc')
-rw-r--r--net/url_request/url_request_http_job.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 42b8182..90a06a7 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -205,9 +205,12 @@ bool URLRequestHttpJob::GetContentEncodings(
encoding_types->push_back(Filter::ConvertEncodingToType(encoding_type));
}
- if (!encoding_types->empty()) {
- Filter::FixupEncodingTypes(*this, encoding_types);
- }
+ // Even if encoding types are empty, there is a chance that we need to add
+ // some decoding, as some proxies strip encoding completely. In such cases,
+ // we may need to add (for example) SDCH filtering (when the context suggests
+ // it is appropriate).
+ Filter::FixupEncodingTypes(*this, encoding_types);
+
return !encoding_types->empty();
}