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

Unified Diff: components/data_reduction_proxy/common/data_reduction_proxy_headers.cc

Issue 651433003: Change MISSING_VIA_HEADER_4XX bypasses to only last 1 second. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test case Created 6 years, 2 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 | « components/data_reduction_proxy/browser/data_reduction_proxy_protocol_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
diff --git a/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc b/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
index 377db65cbb228d924b241c2c6b15780dd829dd84..c8a11f9a48efd1904fcd9863ffe5b464f6855847 100644
--- a/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
+++ b/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
@@ -240,6 +240,12 @@ DataReductionProxyBypassType GetDataReductionProxyBypassType(
// Separate this case from other responses that are missing the header.
if (headers->response_code() >= net::HTTP_BAD_REQUEST &&
headers->response_code() < net::HTTP_INTERNAL_SERVER_ERROR) {
+ // At this point, any 4xx response that is missing the via header
+ // indicates an issue that is scoped to only the current request, so only
+ // bypass the data reduction proxy for a second.
+ // TODO(sclittle): Change this to only bypass the current request once
+ // that is fully supported, see http://crbug.com/418342.
+ data_reduction_proxy_info->bypass_duration = TimeDelta::FromSeconds(1);
return BYPASS_EVENT_TYPE_MISSING_VIA_HEADER_4XX;
}
return BYPASS_EVENT_TYPE_MISSING_VIA_HEADER_OTHER;
« no previous file with comments | « components/data_reduction_proxy/browser/data_reduction_proxy_protocol_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698