Commit dadcc31e authored by sclittle's avatar sclittle Committed by Commit bot

Ignore MISSING_VIA_HEADER_OTHER bypasses if in relevant finch trial

For clients that are part of the finch trial, change the proxy bypass
logic to not trigger a proxy bypass when a response with a non-4xx
response code is expected to have the data reduction proxy header, but
the data reduction proxy via header is missing.

BUG=413035

Review URL: https://codereview.chromium.org/583363002

Cr-Commit-Position: refs/heads/master@{#295825}
parent 78c0c1b6
...@@ -66,6 +66,19 @@ bool DataReductionProxyParams::IsIncludedInCriticalPathBypassFieldTrial() { ...@@ -66,6 +66,19 @@ bool DataReductionProxyParams::IsIncludedInCriticalPathBypassFieldTrial() {
"DataCompressionProxyCriticalBypass") == kEnabled; "DataCompressionProxyCriticalBypass") == kEnabled;
} }
// static
bool DataReductionProxyParams::IsIncludedInHoldbackFieldTrial() {
return FieldTrialList::FindFullName(
"DataCompressionProxyHoldback") == kEnabled;
}
// static
bool DataReductionProxyParams::
IsIncludedInRemoveMissingViaHeaderOtherBypassFieldTrial() {
return FieldTrialList::FindFullName(
"DataReductionProxyRemoveMissingViaHeaderOtherBypass") == kEnabled;
}
DataReductionProxyTypeInfo::DataReductionProxyTypeInfo() DataReductionProxyTypeInfo::DataReductionProxyTypeInfo()
: proxy_servers(), : proxy_servers(),
is_fallback(false), is_fallback(false),
...@@ -76,11 +89,6 @@ DataReductionProxyTypeInfo::DataReductionProxyTypeInfo() ...@@ -76,11 +89,6 @@ DataReductionProxyTypeInfo::DataReductionProxyTypeInfo()
DataReductionProxyTypeInfo::~DataReductionProxyTypeInfo(){ DataReductionProxyTypeInfo::~DataReductionProxyTypeInfo(){
} }
bool DataReductionProxyParams::IsIncludedInHoldbackFieldTrial() {
return FieldTrialList::FindFullName(
"DataCompressionProxyHoldback") == kEnabled;
}
DataReductionProxyParams::DataReductionProxyParams(int flags) DataReductionProxyParams::DataReductionProxyParams(int flags)
: allowed_((flags & kAllowed) == kAllowed), : allowed_((flags & kAllowed) == kAllowed),
fallback_allowed_((flags & kFallbackAllowed) == kFallbackAllowed), fallback_allowed_((flags & kFallbackAllowed) == kFallbackAllowed),
......
...@@ -83,6 +83,13 @@ class DataReductionProxyParams { ...@@ -83,6 +83,13 @@ class DataReductionProxyParams {
// is in effect. // is in effect.
static bool IsIncludedInHoldbackFieldTrial(); static bool IsIncludedInHoldbackFieldTrial();
// Returns true if this client is part of a field trial that removes the
// |MISSING_VIA_HEADER_OTHER| proxy bypass case. This experiment changes proxy
// bypass logic to not trigger a proxy bypass when a response with a non-4xx
// response code is expected to have a data reduction proxy via header, but
// the data reduction proxy via header is missing.
static bool IsIncludedInRemoveMissingViaHeaderOtherBypassFieldTrial();
// Constructs configuration parameters. If |kAllowed|, then the standard // Constructs configuration parameters. If |kAllowed|, then the standard
// data reduction proxy configuration is allowed to be used. If // data reduction proxy configuration is allowed to be used. If
// |kfallbackAllowed| a fallback proxy can be used if the primary proxy is // |kfallbackAllowed| a fallback proxy can be used if the primary proxy is
......
...@@ -73,6 +73,15 @@ bool MaybeBypassProxyAndPrepareToRetry( ...@@ -73,6 +73,15 @@ bool MaybeBypassProxyAndPrepareToRetry(
DataReductionProxyBypassType bypass_type = DataReductionProxyBypassType bypass_type =
GetDataReductionProxyBypassType(original_response_headers, GetDataReductionProxyBypassType(original_response_headers,
&data_reduction_proxy_info); &data_reduction_proxy_info);
if (bypass_type == BYPASS_EVENT_TYPE_MISSING_VIA_HEADER_OTHER &&
DataReductionProxyParams::
IsIncludedInRemoveMissingViaHeaderOtherBypassFieldTrial()) {
// Ignore MISSING_VIA_HEADER_OTHER proxy bypass events if the client is part
// of the field trial to remove these kinds of bypasses.
bypass_type = BYPASS_EVENT_TYPE_MAX;
}
if (proxy_bypass_type) if (proxy_bypass_type)
*proxy_bypass_type = bypass_type; *proxy_bypass_type = bypass_type;
if (bypass_type == BYPASS_EVENT_TYPE_MAX) if (bypass_type == BYPASS_EVENT_TYPE_MAX)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment