| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
|
| index d1e9a4dce6f960cad651a80f67da19efd15a7d57..99b2951abc6120ff1c43e293ea927ad3eaa8ebdd 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
|
| @@ -7,20 +7,21 @@
|
| #include <cmath>
|
|
|
| #include "base/metrics/histogram_macros.h"
|
| #include "base/metrics/sparse_histogram.h"
|
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.h"
|
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h"
|
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.h"
|
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h"
|
| #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h"
|
| #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
|
| +#include "components/data_reduction_proxy/core/common/data_reduction_proxy_util.h"
|
| #include "net/base/host_port_pair.h"
|
| #include "net/base/url_util.h"
|
| #include "net/http/http_request_headers.h"
|
| #include "net/http/http_response_headers.h"
|
| #include "net/proxy/proxy_server.h"
|
| #include "net/proxy/proxy_service.h"
|
|
|
| namespace data_reduction_proxy {
|
|
|
| DataReductionProxyDelegate::DataReductionProxyDelegate(
|
| @@ -112,21 +113,21 @@ void OnResolveProxyHandler(const GURL& url,
|
| const net::ProxyRetryInfoMap& proxy_retry_info,
|
| const DataReductionProxyConfig* config,
|
| net::ProxyInfo* result) {
|
| DCHECK(config);
|
| DCHECK(result->is_empty() || result->is_direct() ||
|
| !config->IsDataReductionProxy(result->proxy_server().host_port_pair(),
|
| NULL));
|
| bool data_saver_proxy_used = true;
|
| if (result->is_empty() || !result->proxy_server().is_direct() ||
|
| result->proxy_list().size() != 1 || url.SchemeIsWSOrWSS() ||
|
| - method == "POST") {
|
| + !IsMethodIdempotent(method)) {
|
| return;
|
| }
|
|
|
| if (data_reduction_proxy_config.is_valid()) {
|
| net::ProxyInfo data_reduction_proxy_info;
|
| data_reduction_proxy_config.proxy_rules().Apply(url,
|
| &data_reduction_proxy_info);
|
| data_reduction_proxy_info.DeprioritizeBadProxies(proxy_retry_info);
|
| if (!data_reduction_proxy_info.proxy_server().is_direct())
|
| result->OverrideProxyList(data_reduction_proxy_info.proxy_list());
|
|
|