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

Unified Diff: net/http/http_network_transaction.cc

Issue 298883011: Record errors that trigger a data reduction proxy bypass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index cf67b1d68131bc18710a182cd295efa6013a5f1d..3af8a80bc2a03cee58a3297b9d69798977dfdf41 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1012,6 +1012,14 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) {
= response_.headers->GetDataReductionProxyBypassEventType(
&data_reduction_proxy_info);
if (proxy_bypass_event < ProxyService::BYPASS_EVENT_TYPE_MAX) {
+ // Bypass all proxies for one second on reception of a 4xx that
+ // originated at the proxy.
Matt Welsh 2014/05/23 23:56:30 We shouldn't be bypassing all 4xx errors. This sho
bengr 2014/05/24 01:22:02 GetDataReductionBypassEventType decides if we shou
+ if (proxy_bypass_event == ProxyService::CLIENT_ERROR_BYPASS) {
+ data_reduction_proxy_info.bypass_all = true;
+ data_reduction_proxy_info.bypass_duration =
+ base::TimeDelta::FromSeconds(1);
+ }
+
ProxyService* proxy_service = session_->proxy_service();
proxy_service->RecordDataReductionProxyBypassInfo(

Powered by Google App Engine
This is Rietveld 408576698