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

Unified Diff: net/http/http_network_transaction_unittest.cc

Issue 418035: A large Content-Length header followed by a connection close could trigger an... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « net/base/io_buffer.cc ('k') | net/http/http_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction_unittest.cc
===================================================================
--- net/http/http_network_transaction_unittest.cc (revision 32433)
+++ net/http/http_network_transaction_unittest.cc (working copy)
@@ -3876,4 +3876,15 @@
EXPECT_EQ(ERR_TUNNEL_CONNECTION_FAILED, rv);
}
+TEST_F(HttpNetworkTransactionTest, LargeContentLengthThenClose) {
+ MockRead data_reads[] = {
+ MockRead("HTTP/1.0 200 OK\r\nContent-Length:6719476739\r\n\r\n"),
+ MockRead(false, OK),
+ };
+ SimpleGetHelperResult out = SimpleGetHelper(data_reads);
+ EXPECT_EQ(OK, out.rv);
+ EXPECT_EQ("HTTP/1.0 200 OK", out.status_line);
+ EXPECT_EQ("", out.response_data);
+}
+
} // namespace net
« no previous file with comments | « net/base/io_buffer.cc ('k') | net/http/http_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698