summaryrefslogtreecommitdiffstats
path: root/net/http/http_stream_parser.cc
diff options
context:
space:
mode:
authordavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 20:59:49 +0000
committerdavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 20:59:49 +0000
commita34f61ee4f3ebc44edc4d144f892841c1e99619a (patch)
treeac38618da85920e5fa50af2be83a0d09a3f3fad2 /net/http/http_stream_parser.cc
parent5938bb1257f7beb2028f9c6acea9a0605e54bde3 (diff)
downloadchromium_src-a34f61ee4f3ebc44edc4d144f892841c1e99619a.zip
chromium_src-a34f61ee4f3ebc44edc4d144f892841c1e99619a.tar.gz
chromium_src-a34f61ee4f3ebc44edc4d144f892841c1e99619a.tar.bz2
Retry requests on reused sockets that receive ERR_EMPTY_RESPONSE.
We retry requests on ERR_CONNECTION_CLOSED in case of a close/reuse race, but ERR_CONNECTION_CLOSED is converted to ERR_EMPTY_RESPONSE if this is a socket's first request. Such a socket is normally not reused unless it was a preconnect miss. To avoid test flakiness, make the UNUSED vs UNUSED_IDLE determination not timing-sensitive. The existing logic is compares idle_time to 0, so it's dependent on clock granularity rather than any intentional timeout. Add equivalent tests to HttpNetworkTransactionTest.KeepAliveConnection for preconnect misses. BUG=352156 Review URL: https://codereview.chromium.org/197283012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_stream_parser.cc')
-rw-r--r--net/http/http_stream_parser.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 0821c84..9b787da 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -904,7 +904,7 @@ bool HttpStreamParser::IsConnectionReused() const {
}
void HttpStreamParser::SetConnectionReused() {
- connection_->set_is_reused(true);
+ connection_->set_reuse_type(ClientSocketHandle::REUSED_IDLE);
}
bool HttpStreamParser::IsConnectionReusable() const {