summaryrefslogtreecommitdiffstats
path: root/net/base/sdch_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/base/sdch_manager.cc')
-rw-r--r--net/base/sdch_manager.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/base/sdch_manager.cc b/net/base/sdch_manager.cc
index be8ae13..9097f88 100644
--- a/net/base/sdch_manager.cc
+++ b/net/base/sdch_manager.cc
@@ -172,10 +172,7 @@ bool SdchManager::CanFetchDictionary(const GURL& referring_url,
return true;
}
-void SdchManager::FetchDictionary(const GURL& referring_url,
- const GURL& dictionary_url) {
- if (!CanFetchDictionary(referring_url, dictionary_url))
- return;
+void SdchManager::FetchDictionary(const GURL& dictionary_url) {
if (fetcher_.get())
fetcher_->Schedule(dictionary_url);
}
@@ -379,6 +376,11 @@ bool SdchManager::Dictionary::CanSet(const std::string& domain,
5. If the dictionary has a Port attribute and the referer URL's port was not
in the list.
*/
+
+ // TODO(jar): Redirects in dictionary fetches might plausibly be problematic,
+ // and hence the conservative approach is to not allow any redirects (if there
+ // were any... then don't allow the dictionary to be set).
+
if (domain.empty()) {
SdchErrorRecovery(DICTIONARY_MISSING_DOMAIN_SPECIFIER);
return false; // Domain is required.