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

Issue 17382012: [SPDY] Refactor SpdyStream's handling of response headers (Closed)

Created:
7 years, 6 months ago by akalin
Modified:
7 years, 6 months ago
Reviewers:
Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org
Visibility:
Public.

Description

[SPDY] Refactor SpdyStream's handling of response headers Rename OnResponseHeadersReceived() to OnResponseHeadersUpdated() and remove some of its extraneous parameters. Document its semantics and that of the other delegate functions. Fix bug in PushedStreamReplayData() where the stream being closed/deleted wasn't handled correctly. Also fix memory leaks of the pending frames. Use continue_buffering_data_ only for push streams. Rename request_/response_ to request_headers_/response_headers_. Keep track of whether all required response headers are complete, and send data to the delegate only after that becomes true. Rename OnResponseHeadersReceived() and OnHeaders() to On{Initial,Additional}ResponseHeadersReceived(), respectively. Add MergeWithResponseHeaders() utility function and call it from On{Initial,Additional}ResponseHeadersReceived(). Always convert ERR_INCOMPLETE_SPDY_HEADERS to OK for push streams. Rename ContainsUpperAscii() (ambiguous) to ContainsUppercaseAscii(). Move some tests from SpdyNetworkTransaction to SpdyStream. Some other miscellaneous renaming and cleanup. BUG=251442 R=rch@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=208169

Patch Set 1 #

Patch Set 2 : Forgot to rename a function #

Total comments: 20

Patch Set 3 : Address comments #

Patch Set 4 : Final tweaks #

Patch Set 5 : Fix UAF #

Patch Set 6 : Rebase #

Patch Set 7 : More updates from rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+745 lines, -531 lines) Patch
M net/spdy/spdy_http_stream.h View 1 2 3 4 5 2 chunks +6 lines, -5 lines 0 comments Download
M net/spdy/spdy_http_stream.cc View 1 2 3 4 5 6 5 chunks +16 lines, -32 lines 0 comments Download
M net/spdy/spdy_http_utils.cc View 1 1 chunk +0 lines, -2 lines 0 comments Download
M net/spdy/spdy_network_transaction_unittest.cc View 1 2 3 4 5 3 chunks +1 line, -183 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket.h View 1 2 3 4 5 1 chunk +3 lines, -4 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket.cc View 1 2 3 4 5 2 chunks +8 lines, -11 lines 0 comments Download
M net/spdy/spdy_session.h View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M net/spdy/spdy_session.cc View 1 2 3 4 5 7 chunks +15 lines, -7 lines 0 comments Download
M net/spdy/spdy_session_unittest.cc View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M net/spdy/spdy_stream.h View 1 2 3 4 5 6 11 chunks +124 lines, -47 lines 0 comments Download
M net/spdy/spdy_stream.cc View 1 2 3 4 5 16 chunks +164 lines, -154 lines 0 comments Download
M net/spdy/spdy_stream_test_util.h View 1 2 3 5 chunks +10 lines, -13 lines 0 comments Download
M net/spdy/spdy_stream_test_util.cc View 1 2 3 4 chunks +16 lines, -25 lines 0 comments Download
M net/spdy/spdy_stream_unittest.cc View 1 2 3 3 chunks +352 lines, -11 lines 0 comments Download
M net/spdy/spdy_websocket_stream.h View 1 2 2 chunks +6 lines, -8 lines 0 comments Download
M net/spdy/spdy_websocket_stream.cc View 1 2 1 chunk +5 lines, -6 lines 0 comments Download
M net/spdy/spdy_websocket_stream_spdy2_unittest.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M net/spdy/spdy_websocket_stream_spdy3_unittest.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M net/websockets/websocket_job.h View 1 chunk +2 lines, -2 lines 0 comments Download
M net/websockets/websocket_job.cc View 1 chunk +4 lines, -7 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
akalin
+rch for review
7 years, 6 months ago (2013-06-18 22:04:40 UTC) #1
akalin
On 2013/06/18 22:04:40, akalin wrote: > +rch for review Recommended order of review: spdy_stream.* spdy_session.* ...
7 years, 6 months ago (2013-06-18 22:05:03 UTC) #2
Ryan Hamilton
Nice cleanup. The semantics are much clearer now. https://codereview.chromium.org/17382012/diff/2001/net/spdy/spdy_network_transaction_unittest.cc File net/spdy/spdy_network_transaction_unittest.cc (left): https://codereview.chromium.org/17382012/diff/2001/net/spdy/spdy_network_transaction_unittest.cc#oldcode6192 net/spdy/spdy_network_transaction_unittest.cc:6192: << ...
7 years, 6 months ago (2013-06-19 18:58:36 UTC) #3
akalin
PTAL! https://codereview.chromium.org/17382012/diff/2001/net/spdy/spdy_network_transaction_unittest.cc File net/spdy/spdy_network_transaction_unittest.cc (left): https://codereview.chromium.org/17382012/diff/2001/net/spdy/spdy_network_transaction_unittest.cc#oldcode6192 net/spdy/spdy_network_transaction_unittest.cc:6192: << expected_push_result; On 2013/06/19 18:58:36, Ryan Hamilton wrote: ...
7 years, 6 months ago (2013-06-21 21:13:25 UTC) #4
Ryan Hamilton
LGTM!
7 years, 6 months ago (2013-06-23 15:06:41 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/17382012/37002
7 years, 6 months ago (2013-06-23 17:30:01 UTC) #6
commit-bot: I haz the power
Failed to apply patch for net/spdy/spdy_http_stream.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 6 months ago (2013-06-24 06:15:40 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/17382012/51002
7 years, 6 months ago (2013-06-24 07:30:36 UTC) #8
akalin
7 years, 6 months ago (2013-06-24 07:42:23 UTC) #9
Message was sent while issue was closed.
Committed patchset #7 manually as r208169 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698