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

Unified Diff: net/http/http_response_headers.cc

Issue 298883011: Record errors that trigger a data reduction proxy bypass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 7 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 | « jingle/glue/proxy_resolving_client_socket.cc ('k') | net/http/http_response_headers_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_headers.cc
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index 7ecf37a2352704f02685e9012c64a04c296999bd..f07fbafefb5b1887e6ac9722ad86d05fef0b3088 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -1504,6 +1504,13 @@ HttpResponseHeaders::GetDataReductionProxyBypassEventType(
// response is to minimize information transfer, a sender in general
// should not generate representation metadata other than Cache-Control,
// Content-Location, Date, ETag, Expires, and Vary.
+
+ // The proxy Via header might also not be present in a 4xx response.
+ // Separate this case from other responses that are missing the header.
+ if (response_code() >= HTTP_BAD_REQUEST &&
+ response_code() < HTTP_INTERNAL_SERVER_ERROR) {
+ return ProxyService::PROXY_4XX_BYPASS;
+ }
return ProxyService::MISSING_VIA_HEADER;
}
// There is no bypass event.
« no previous file with comments | « jingle/glue/proxy_resolving_client_socket.cc ('k') | net/http/http_response_headers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698