request, &data_reduction_proxy_type_info)) {
return false;
}
+ // TODO(bengr): Implement bypass for CONNECT tunnel.
+ if (data_reduction_proxy_type_info.is_ssl)
+ return false;
// Empty implies either that the request was served from cache or that
// request was served directly from the origin.
if (data_reduction_proxy_type_info.proxy_servers.first.is_empty())
return false;
+ // At this point, the response is expected to have the data reduction proxy
+ // via header, so detect and report cases where the via header is missing.
+ DataReductionProxyUsageStats::DetectAndRecordMissingViaHeaderResponseCode(
+ !data_reduction_proxy_type_info.proxy_servers.second.is_empty(),
+ original_response_headers);
+
DataReductionProxyTamperDetection::DetectAndReport(
original_response_headers,
data_reduction_proxy_type_info.proxy_servers.first.SchemeIsSecure());
DataReductionProxyBypassType bypass_type =
GetDataReductionProxyBypassType(original_response_headers,
&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)
*proxy_bypass_type = bypass_type;
if (bypass_type == BYPASS_EVENT_TYPE_MAX)