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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 1563163002: Don't pass SDCH GetDictionary event for cached responses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test added Created 4 years, 11 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/url_request/url_request_http_job_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 47a0666e3fc7ad50225110e7f394da8adf08c83c..9a051701a6939c98e47e62b87ba39ecffdab81ec 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -366,7 +366,9 @@ void URLRequestHttpJob::NotifyHeadersComplete() {
if (GetResponseHeaders()->EnumerateHeader(&iter, name, &url_text)) {
// Resolve suggested URL relative to request url.
GURL sdch_dictionary_url = request_->url().Resolve(url_text);
- if (sdch_dictionary_url.is_valid()) {
+ // Don't try to download Dictionary for cached responses. It's either
+ // useless or too late.
+ if (sdch_dictionary_url.is_valid() && !is_cached_content_) {
rv = sdch_manager->OnGetDictionary(request_->url(),
sdch_dictionary_url);
if (rv != SDCH_OK) {
« no previous file with comments | « no previous file | net/url_request/url_request_http_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698