OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <string> | 6 #include <string> |
7 #include <sys/epoll.h> | 7 #include <sys/epoll.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 QuicDispatcher* dispatcher = | 1359 QuicDispatcher* dispatcher = |
1360 QuicServerPeer::GetDispatcher(server_thread_->server()); | 1360 QuicServerPeer::GetDispatcher(server_thread_->server()); |
1361 QuicSession* session = dispatcher->session_map().begin()->second; | 1361 QuicSession* session = dispatcher->session_map().begin()->second; |
1362 QuicFlowController* server_connection_flow_controller = | 1362 QuicFlowController* server_connection_flow_controller = |
1363 session->flow_controller(); | 1363 session->flow_controller(); |
1364 EXPECT_EQ(kSessionIFCW, QuicFlowControllerPeer::ReceiveWindowSize( | 1364 EXPECT_EQ(kSessionIFCW, QuicFlowControllerPeer::ReceiveWindowSize( |
1365 server_connection_flow_controller)); | 1365 server_connection_flow_controller)); |
1366 server_thread_->Resume(); | 1366 server_thread_->Resume(); |
1367 } | 1367 } |
1368 | 1368 |
| 1369 TEST_P(EndToEndTest, RequestWithNoBodyWillNeverSendStreamFrameWithFIN) { |
| 1370 // Regression test for b/16010251. |
| 1371 // A stream created on receipt of a simple request with no body will never get |
| 1372 // a stream frame with a FIN. Verify that we don't keep track of the stream in |
| 1373 // the locally closed streams map: it will never be removed if so. |
| 1374 ASSERT_TRUE(Initialize()); |
| 1375 |
| 1376 // Send a simple headers only request, and receive response. |
| 1377 EXPECT_EQ(kFooResponseBody, client_->SendSynchronousRequest("/foo")); |
| 1378 EXPECT_EQ(200u, client_->response_headers()->parsed_response_code()); |
| 1379 |
| 1380 // Now verify that the server is not waiting for a final FIN or RST. |
| 1381 server_thread_->Pause(); |
| 1382 QuicDispatcher* dispatcher = |
| 1383 QuicServerPeer::GetDispatcher(server_thread_->server()); |
| 1384 QuicSession* session = dispatcher->session_map().begin()->second; |
| 1385 EXPECT_EQ(0u, QuicSessionPeer::GetLocallyClosedStreamsHighestOffset( |
| 1386 session).size()); |
| 1387 server_thread_->Resume(); |
| 1388 } |
| 1389 |
1369 } // namespace | 1390 } // namespace |
1370 } // namespace test | 1391 } // namespace test |
1371 } // namespace tools | 1392 } // namespace tools |
1372 } // namespace net | 1393 } // namespace net |
OLD | NEW |