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

Unified Diff: net/http/http_network_transaction.cc

Issue 156373002: Support for new data reduction proxy via header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation error on unsupported platforms Created 6 years, 10 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 | « net/http/http_network_layer_unittest.cc ('k') | net/http/http_response_headers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 96817e2b14fa2c1bb96ff827015943e96c6aedf0..4cbf3e002d59695d83b5ed24471f796fbb080156 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -119,30 +119,6 @@ base::Value* NetLogSSLVersionFallbackCallback(
return dict;
}
-#if defined(SPDY_PROXY_AUTH_ORIGIN)
-// Returns true if |response_headers| contains the data reduction proxy Via
-// header value.
-bool IsChromeProxyResponse(const net::HttpResponseHeaders* response_headers) {
- if (!response_headers) {
- return false;
- }
- const char kDataReductionProxyViaValue[] = "1.1 Chrome Compression Proxy";
- size_t value_len = strlen(kDataReductionProxyViaValue);
- void* iter = NULL;
- std::string temp;
- while (response_headers->EnumerateHeader(&iter, "Via", &temp)) {
- std::string::const_iterator it =
- std::search(temp.begin(), temp.end(),
- kDataReductionProxyViaValue,
- kDataReductionProxyViaValue + value_len,
- base::CaseInsensitiveCompareASCII<char>());
- if (it != temp.end())
- return true;
- }
- return false;
-}
-#endif
-
} // namespace
//-----------------------------------------------------------------------------
@@ -1043,7 +1019,7 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) {
#endif
if (chrome_proxy_used || chrome_fallback_proxy_used) {
- if (!IsChromeProxyResponse(response_.headers.get())) {
+ if (!response_.headers->IsChromeProxyResponse()) {
proxy_bypass_event = ProxyService::MISSING_VIA_HEADER;
} else if (response_.headers->GetChromeProxyInfo(&chrome_proxy_info)) {
if (chrome_proxy_info.bypass_duration < TimeDelta::FromMinutes(30))
« no previous file with comments | « net/http/http_network_layer_unittest.cc ('k') | net/http/http_response_headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698