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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc

Issue 2224003004: Add Accept-Encoding: br for secure data reduction proxy requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Accept-Encoding: br for secure data reduction proxy requests Created 4 years, 4 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
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
index 50a7a09b9e340d19941f6db4775ee197343cbf61..5dd973c2854446fc7f7809b42156f768b9f38dd3 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
@@ -225,6 +225,12 @@ void DataReductionProxyNetworkDelegate::OnBeforeSendHeadersInternal(
if (data_reduction_proxy_request_options_) {
data_reduction_proxy_request_options_->AddRequestHeader(headers);
+ // Data Reduction Proxy handles Accept-Encoding: Brotli correctly, but don't
+ // trust intermediate proxies.
+ if (proxy_info.is_https() || proxy_info.is_quic()) {
+ data_reduction_proxy_request_options_->AddBrotliAcceptEncoding(*request,
+ headers);
+ }
}
}
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698