Chromium Code Reviews| 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..b2248ec3c48afd8c64fbf16b2a033a5e1f07d98a 100644 |
| --- a/net/http/http_response_headers.cc |
| +++ b/net/http/http_response_headers.cc |
| @@ -1504,6 +1504,15 @@ 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")) |
|
mef
2014/05/28 15:39:57
Um, why do you need to hardcode GFE here?
bengr
2014/05/29 16:09:48
A missing via header with this server error indica
|
| + return ProxyService::PROXY_4XX_BYPASS; |
| + // Otherwise, bypass on the missing Via header. |
| + } |
| return ProxyService::MISSING_VIA_HEADER; |
| } |
| // There is no bypass event. |