Commit d23ee3c1 authored by Tarun Bansal's avatar Tarun Bansal Committed by Commit Bot

Add a DCHECK to ensure that probe responses are not checked for explicit bypasses

Add an explicit DCHECK in the data reduction proxy (DRP) to
ensure that we do not check for explicit bypasses
in the responses.

Bug: 760294
Change-Id: Ifd683efc79d484388f2446757e9025068c1d6fb8
Reviewed-on: https://chromium-review.googlesource.com/963100Reviewed-by: default avatarDoug Arnett <dougarnett@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543452}
parent 6b3d57c3
...@@ -373,6 +373,12 @@ DataReductionProxyBypassType GetDataReductionProxyBypassType( ...@@ -373,6 +373,12 @@ DataReductionProxyBypassType GetDataReductionProxyBypassType(
DataReductionProxyInfo* data_reduction_proxy_info) { DataReductionProxyInfo* data_reduction_proxy_info) {
DCHECK(data_reduction_proxy_info); DCHECK(data_reduction_proxy_info);
// Responses from the warmup URL probe should not be checked for bypass types.
// Doing so may unnecessarily cause all data saver proxies to be marked as
// bad (e.g., when via header is missing on the response to the probe from the
// HTTP proxy).
DCHECK(url_chain.empty() || (params::GetWarmupURL() != url_chain.back()));
bool has_via_header = HasDataReductionProxyViaHeader(headers, nullptr); bool has_via_header = HasDataReductionProxyViaHeader(headers, nullptr);
if (has_via_header && HasURLRedirectCycle(url_chain)) { if (has_via_header && HasURLRedirectCycle(url_chain)) {
......
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