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

Unified Diff: net/http/http_response_headers_unittest.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: 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
Index: net/http/http_response_headers_unittest.cc
diff --git a/net/http/http_response_headers_unittest.cc b/net/http/http_response_headers_unittest.cc
index c9c8c467eaf26bd19942a13a089a58cf03179286..61670e7caf684e865bdcb2cc7cc82daa69e3a037 100644
--- a/net/http/http_response_headers_unittest.cc
+++ b/net/http/http_response_headers_unittest.cc
@@ -2245,6 +2245,26 @@ TEST(HttpResponseHeadersTest, GetDataReductionProxyBypassEventType) {
"Chrome-Proxy: bypass=1799\n",
net::ProxyService::SHORT_BYPASS,
},
+ { "HTTP/1.1 502 Bad Gateway\n"
+ "Chrome-Proxy: bypass=1799\n",
+ net::ProxyService::SHORT_BYPASS,
+ },
+ { "HTTP/1.1 414 Request-URI Too Long\n"
+ "Server: GFE/2.0\n",
+ net::ProxyService::CLIENT_ERROR_BYPASS,
+ },
+ { "HTTP/1.1 414 Request-URI Too Long\n",
+ net::ProxyService::BYPASS_EVENT_TYPE_MAX,
Matt Welsh 2014/05/23 23:56:30 I think this is wrong - you should do a 1-5 minute
bengr 2014/05/24 01:22:02 Done.
+ },
+ { "HTTP/1.1 414 Request-URI Too Long\n"
+ "Via: 1.1 Chrome-Compression-Proxy\n",
+ net::ProxyService::BYPASS_EVENT_TYPE_MAX,
+ },
+ { "HTTP/1.1 414 Request-URI Too Long\n"
+ "Server: GFE/2.0\n"
+ "Via: 1.1 Chrome-Compression-Proxy\n",
+ net::ProxyService::BYPASS_EVENT_TYPE_MAX,
+ },
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
std::string headers(tests[i].headers);

Powered by Google App Engine
This is Rietveld 408576698