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

Issue 1884943003: HttpStreamParser: Don't reuse sockets which receive unparsed data. (Closed)

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

Description

HttpStreamParser: Don't reuse sockets which receive unparsed data. If HttpStreamParser has extra data left over after consuming a valid HTTP/1.x response on a socket, it would still allow the socket to be reused if it was connected and idle. Since we have no idea what the data actually was, this just seems like a bad idea. This CL changes that behavior, so such sockets are no longer considered reuseable. This does have the downside of papering over server bugs, but it still seems like the right way to go. BUG=603140 Committed: https://crrev.com/5f94fda863b8540f99eb571b4f94c8dd24dba406 Cr-Commit-Position: refs/heads/master@{#397504}

Patch Set 1 #

Patch Set 2 : Fix draining responses #

Patch Set 3 : More fixes, new test #

Patch Set 4 : Fix drainer test ('True' means closed...) #

Total comments: 4

Patch Set 5 : Switch to simpler solution #

Patch Set 6 : Remove more stuff #

Patch Set 7 : Removed a bit too much, fix case with body #

Total comments: 5

Patch Set 8 : Response to comments #

Patch Set 9 : response #

Patch Set 10 : oops #

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

Messages

Total messages: 16 (6 generated)
mmenke
asanka: Sending this to you because I know you have some familiarity with HttpStreamParser::CanReuseConnection. This ...
4 years, 8 months ago (2016-04-14 14:27:10 UTC) #2
mmenke
asanka: Ping!
4 years, 7 months ago (2016-05-11 19:58:33 UTC) #3
asanka
https://codereview.chromium.org/1884943003/diff/60001/net/http/http_basic_stream.cc File net/http/http_basic_stream.cc (right): https://codereview.chromium.org/1884943003/diff/60001/net/http/http_basic_stream.cc#newcode123 net/http/http_basic_stream.cc:123: new HttpResponseBodyDrainer(this, std::move(response_info)); The ownership semantics of the Drain() ...
4 years, 7 months ago (2016-05-13 15:19:52 UTC) #4
mmenke
Sorry for the slow followup. I've gone with a much simpler approach. For review, I ...
4 years, 7 months ago (2016-05-20 21:50:02 UTC) #7
mmenke
asanka: Ping! Not that there's any rush on this - not blocking anything, and unlikely ...
4 years, 6 months ago (2016-05-27 16:42:34 UTC) #8
asanka
lgtm % nits. https://codereview.chromium.org/1884943003/diff/160001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/1884943003/diff/160001/net/http/http_network_transaction_unittest.cc#newcode2260 net/http/http_network_transaction_unittest.cc:2260: base::RunLoop().RunUntilIdle(); For consistency, shouldn't this be ...
4 years, 6 months ago (2016-06-01 19:43:35 UTC) #9
mmenke
Thanks for the feedback! https://codereview.chromium.org/1884943003/diff/160001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/1884943003/diff/160001/net/http/http_network_transaction_unittest.cc#newcode2260 net/http/http_network_transaction_unittest.cc:2260: base::RunLoop().RunUntilIdle(); On 2016/06/01 19:43:34, asanka ...
4 years, 6 months ago (2016-06-02 15:56:23 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1884943003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1884943003/220001
4 years, 6 months ago (2016-06-02 19:10:10 UTC) #13
commit-bot: I haz the power
Committed patchset #10 (id:220001)
4 years, 6 months ago (2016-06-02 20:54:29 UTC) #14
commit-bot: I haz the power
4 years, 6 months ago (2016-06-02 20:56:59 UTC) #16
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/5f94fda863b8540f99eb571b4f94c8dd24dba406
Cr-Commit-Position: refs/heads/master@{#397504}

Powered by Google App Engine
This is Rietveld 408576698