Index: net/http/http_network_transaction_unittest.cc |
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc |
index 4381646c3bd34a1cbfe7f2b3cf70e69e7bf06a53..9e3b8d66b6d5c1757fe175e5655545a60b3c3376 100644 |
--- a/net/http/http_network_transaction_unittest.cc |
+++ b/net/http/http_network_transaction_unittest.cc |
@@ -1439,6 +1439,17 @@ TEST_P(HttpNetworkTransactionTest, KeepAliveConnectionEOF) { |
KeepAliveConnectionResendRequestTest(NULL, &read_failure); |
} |
+// Make sure that on a 408 response (Request Timeout), the request is retried, |
+// if the socket was a reused keep alive socket. |
+TEST_P(HttpNetworkTransactionTest, KeepAlive408) { |
+ MockRead read_failure(SYNCHRONOUS, |
+ "HTTP/1.1 408 Request Timeout\r\n" |
+ "Connection: Keep-Alive\r\n" |
+ "Content-Length: 6\r\n\r\n" |
+ "Pickle"); |
+ KeepAliveConnectionResendRequestTest(NULL, &read_failure); |
+} |
+ |
TEST_P(HttpNetworkTransactionTest, |
PreconnectErrorNotConnectedOnWrite) { |
MockWrite write_failure(ASYNC, ERR_SOCKET_NOT_CONNECTED); |
@@ -1460,6 +1471,18 @@ TEST_P(HttpNetworkTransactionTest, PreconnectErrorAsyncEOF) { |
PreconnectErrorResendRequestTest(NULL, &read_failure, false); |
} |
+// Make sure that on a 408 response (Request Timeout), the request is retried, |
+// if the socket was a preconnected (UNUSED_IDLE) socket. |
+TEST_P(HttpNetworkTransactionTest, RetryOnIdle408) { |
+ MockRead read_failure(SYNCHRONOUS, |
+ "HTTP/1.1 408 Request Timeout\r\n" |
+ "Connection: Keep-Alive\r\n" |
+ "Content-Length: 6\r\n\r\n" |
+ "Pickle"); |
+ KeepAliveConnectionResendRequestTest(NULL, &read_failure); |
+ PreconnectErrorResendRequestTest(NULL, &read_failure, false); |
+} |
+ |
TEST_P(HttpNetworkTransactionTest, |
SpdyPreconnectErrorNotConnectedOnWrite) { |
MockWrite write_failure(ASYNC, ERR_SOCKET_NOT_CONNECTED); |