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

Unified Diff: net/http/http_proxy_client_socket_pool_spdy2_unittest.cc

Issue 15688012: net: don't process truncated headers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only enforce this for HTTPS URLs. Created 7 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_proxy_client_socket_pool_spdy2_unittest.cc
diff --git a/net/http/http_proxy_client_socket_pool_spdy2_unittest.cc b/net/http/http_proxy_client_socket_pool_spdy2_unittest.cc
index 0d32634995945fdd7d52fcbeae4de29e9f54127d..50b6bf6efe7e6151be79f2d7b2d6e305cef2f086 100644
--- a/net/http/http_proxy_client_socket_pool_spdy2_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_spdy2_unittest.cc
@@ -478,7 +478,13 @@ TEST_P(HttpProxyClientSocketPoolSpdy2Test, TunnelUnexpectedClose) {
EXPECT_FALSE(handle_.socket());
data_->RunFor(3);
- EXPECT_EQ(ERR_CONNECTION_CLOSED, callback_.WaitForResult());
+ if (GetParam() == SPDY) {
+ // SPDY cannot process a headers block unless it's complete and so it
+ // returns ERR_CONNECTION_CLOSED in this case.
+ EXPECT_EQ(ERR_CONNECTION_CLOSED, callback_.WaitForResult());
+ } else {
+ EXPECT_EQ(ERR_HEADERS_TRUNCATED, callback_.WaitForResult());
+ }
EXPECT_FALSE(handle_.is_initialized());
EXPECT_FALSE(handle_.socket());
}

Powered by Google App Engine
This is Rietveld 408576698