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

Unified Diff: components/data_reduction_proxy/common/data_reduction_proxy_headers.cc

Issue 314173002: Bypass data reduction proxy if no handler is found for a 407 error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@benpatch
Patch Set: Created 6 years, 6 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 | net/proxy/proxy_service.h » ('j') | net/proxy/proxy_service.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
diff --git a/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc b/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
index c7775c81216f46579e772a3b56357031133cef20..521062da91d92febc5af86bcad8236e433376c74 100644
--- a/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
+++ b/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
@@ -121,6 +121,11 @@ GetDataReductionProxyBypassEventType(
// Fall back if a 500, 502 or 503 is returned.
return ProxyService::INTERNAL_SERVER_ERROR_BYPASS;
}
+ std::string dummy;
+ if (headers->response_code() == net::HTTP_PROXY_AUTHENTICATION_REQUIRED
+ && !headers->EnumerateHeader(NULL, "Proxy-Authenticate", &dummy)) {
bengr 2014/06/05 17:26:24 Use headers->HasHeader("Proxy-Authenticate").
Not at Google. Contact bengr 2014/06/05 17:51:53 Done.
+ return ProxyService::PROXY_407_BYPASS;
+ }
if (!IsDataReductionProxyResponse(headers) &&
(headers->response_code() != net::HTTP_NOT_MODIFIED)) {
// A Via header might not be present in a 304. Since the goal of a 304
« no previous file with comments | « no previous file | net/proxy/proxy_service.h » ('j') | net/proxy/proxy_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698