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..7c36dbd24febe70ab57f414505c18a46e6e0b9d6 100644 |
--- a/net/http/http_response_headers.cc |
+++ b/net/http/http_response_headers.cc |
@@ -1504,6 +1504,17 @@ 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. |
+ |
+ // A Via header might also not be present in a 4xx response. If there is |
+ // evidence that the 4xx response was generated by the proxy, bypass it. |
+ if (response_code() >= HTTP_BAD_REQUEST && |
+ response_code() < HTTP_INTERNAL_SERVER_ERROR) { |
+ if (HasHeaderValue("Server", "GFE/2.0")) |
+ return ProxyService::CLIENT_ERROR_BYPASS; |
+ // Do not bypass other 4xx responses on an incorrect or missing Via |
Matt Welsh
2014/05/23 23:56:30
Wait, according to your doc, you should be doing a
bengr
2014/05/24 01:22:02
Discussed offline. Changed.
|
+ // header. |
+ return ProxyService::BYPASS_EVENT_TYPE_MAX; |
+ } |
return ProxyService::MISSING_VIA_HEADER; |
} |
// There is no bypass event. |