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

Issue 1494813002: Fix HttpStreamParser::CanReuseConnection(). (Closed)

Created:
5 years ago by mmenke
Modified:
5 years ago
Reviewers:
asanka
CC:
chromium-reviews, cbentzel+watch_chromium.org, Ryan Hamilton
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix HttpStreamParser::CanReuseConnection(). It was incorrectly returning false when the connection was not idle. This regressed in https://codereview.chromium.org/1320683003, when the logic was moved down into HttpStreamParser from HttpNetworkTransaction. The most noticeable thing this broke is multi-round auth when there was a large response body, but it also made it so Chrome wasn't reusing sockets when requests with partially received responses were cancelled. I'm landing this without tests - unfortunately, writing tests for this revealed that a huge number of net tests rely on mock sockets that keep pointers around to SocketDataProviders that are deleted before the mock socket is. Tests are blocked on either resolving that, or making new infrastructure that works around the issue. BUG=544255 Committed: https://crrev.com/911ee022046cbcfaa8c7ea8d41760bea5b67070c Cr-Commit-Position: refs/heads/master@{#363116}

Patch Set 1 #

Patch Set 2 : Update logic #

Patch Set 3 : Fix tests #

Patch Set 4 : Bring back removed test #

Total comments: 4

Patch Set 5 : add override #

Total comments: 2

Patch Set 6 : Fix typo #

Patch Set 7 : More fixes #

Total comments: 1

Patch Set 8 : One more try? #

Patch Set 9 : Remove tests #

Patch Set 10 : One test change was needed... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -8 lines) Patch
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -6 lines 0 comments Download
M net/http/http_stream_parser.h View 1 chunk +2 lines, -1 line 0 comments Download
M net/http/http_stream_parser.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 46 (22 generated)
mmenke
Believe all tests should now pass. https://codereview.chromium.org/1494813002/diff/80001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/1494813002/diff/80001/net/http/http_network_transaction_unittest.cc#newcode5904 net/http/http_network_transaction_unittest.cc:5904: MockRead("hello world"), MockRead(ASYNC, ...
5 years ago (2015-12-03 16:15:35 UTC) #3
asanka
LGTM https://codereview.chromium.org/1494813002/diff/80001/net/socket/socket_test_util.h File net/socket/socket_test_util.h (right): https://codereview.chromium.org/1494813002/diff/80001/net/socket/socket_test_util.h#newcode376 net/socket/socket_test_util.h:376: // When true, IsConnectedAndIdle() will return false if ...
5 years ago (2015-12-03 17:41:57 UTC) #4
mmenke
Thanks! https://codereview.chromium.org/1494813002/diff/80001/net/socket/socket_test_util.h File net/socket/socket_test_util.h (right): https://codereview.chromium.org/1494813002/diff/80001/net/socket/socket_test_util.h#newcode376 net/socket/socket_test_util.h:376: // When true, IsConnectedAndIdle() will return false if ...
5 years ago (2015-12-03 18:24:24 UTC) #5
mmenke
Doh! We still have a problem... http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/139126/steps/net_unittests%20%28with%20patch%29/logs/URLRequestHttpJobWithMockSocketsTest.TestContentLengthCancelledRequest That's a real failure. A ResponseBodyDrainer is still ...
5 years ago (2015-12-03 18:29:49 UTC) #6
mmenke
On 2015/12/03 18:29:49, mmenke wrote: > Doh! We still have a problem... > > http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/139126/steps/net_unittests%20%28with%20patch%29/logs/URLRequestHttpJobWithMockSocketsTest.TestContentLengthCancelledRequest ...
5 years ago (2015-12-03 18:31:21 UTC) #7
mmenke
WDYT? I haven't extended the extra logic to the SSL mock sockets (Not currently needed, ...
5 years ago (2015-12-03 19:37:10 UTC) #8
mmenke
[+rch]: Just FYI, concerning test socket changes.
5 years ago (2015-12-03 19:49:12 UTC) #9
mmenke
On 2015/12/03 19:49:12, mmenke wrote: > [+rch]: Just FYI, concerning test socket changes. And general ...
5 years ago (2015-12-03 19:49:47 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494813002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494813002/140001
5 years ago (2015-12-03 20:14:16 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/104830)
5 years ago (2015-12-03 20:59:04 UTC) #14
mmenke
So this is running into issues with mock sockets not created through factories, since they ...
5 years ago (2015-12-03 21:24:16 UTC) #15
asanka
On 2015/12/03 21:24:16, mmenke wrote: > So this is running into issues with mock sockets ...
5 years ago (2015-12-03 21:25:06 UTC) #16
mmenke
On 2015/12/03 21:24:16, mmenke wrote: > So this is running into issues with mock sockets ...
5 years ago (2015-12-03 22:21:39 UTC) #17
mmenke
On 2015/12/03 22:21:39, mmenke wrote: > On 2015/12/03 21:24:16, mmenke wrote: > > So this ...
5 years ago (2015-12-03 22:22:21 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494813002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494813002/180001
5 years ago (2015-12-03 22:28:13 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494813002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494813002/180001
5 years ago (2015-12-03 23:04:31 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494813002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494813002/180001
5 years ago (2015-12-03 23:14:11 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494813002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494813002/200001
5 years ago (2015-12-03 23:44:19 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494813002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494813002/220001
5 years ago (2015-12-04 00:53:56 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494813002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494813002/200001
5 years ago (2015-12-04 01:15:37 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) android_chromium_gn_compile_dbg on ...
5 years ago (2015-12-04 01:49:53 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1494813002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1494813002/200001
5 years ago (2015-12-04 02:39:46 UTC) #42
commit-bot: I haz the power
Committed patchset #10 (id:200001)
5 years ago (2015-12-04 03:58:49 UTC) #44
commit-bot: I haz the power
5 years ago (2015-12-04 03:59:56 UTC) #46
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/911ee022046cbcfaa8c7ea8d41760bea5b67070c
Cr-Commit-Position: refs/heads/master@{#363116}

Powered by Google App Engine
This is Rietveld 408576698