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

Issue 6292013: Add chunked uploads support to SPDY (Closed)

Created:
9 years, 10 months ago by Satish
Modified:
9 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Add chunked uploads support to SPDY As part of this, I had to move the chunked encoding part from UploadData::Element::SetChunk to HttpStreamParser::DoSendBody as SPDY doesn't have this encoded format and UploadData needs to serve both. BUG=none TEST=net_unittests (2 new tests added) Committed and rolled back: http://src.chromium.org/viewvc/chrome?view=rev&revision=76892 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=76930

Patch Set 1 #

Total comments: 10

Patch Set 2 : . #

Total comments: 25

Patch Set 3 : . #

Total comments: 8

Patch Set 4 : . #

Total comments: 10

Patch Set 5 : . #

Total comments: 15

Patch Set 6 : . #

Patch Set 7 : . #

Total comments: 6

Patch Set 8 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+371 lines, -89 lines) Patch
M chrome/common/net/url_fetcher.h View 1 2 3 4 1 chunk +1 line, -6 lines 0 comments Download
M chrome/common/net/url_fetcher.cc View 1 2 3 4 3 chunks +15 lines, -17 lines 0 comments Download
M net/base/upload_data.h View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M net/base/upload_data.cc View 1 2 3 4 5 2 chunks +8 lines, -9 lines 0 comments Download
M net/base/upload_data_stream.h View 1 2 3 4 5 6 7 3 chunks +20 lines, -0 lines 0 comments Download
M net/base/upload_data_stream.cc View 1 2 3 4 5 6 4 chunks +21 lines, -2 lines 0 comments Download
M net/http/http_stream_parser.h View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M net/http/http_stream_parser.cc View 1 2 3 4 chunks +56 lines, -9 lines 0 comments Download
M net/spdy/spdy_http_stream.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M net/spdy/spdy_http_stream.cc View 1 2 3 4 5 3 chunks +26 lines, -5 lines 0 comments Download
M net/spdy/spdy_http_stream_unittest.cc View 1 2 3 4 5 6 2 chunks +64 lines, -2 lines 0 comments Download
M net/spdy/spdy_http_utils.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M net/spdy/spdy_network_transaction_unittest.cc View 1 2 3 4 5 6 4 chunks +50 lines, -0 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M net/spdy/spdy_proxy_client_socket.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -2 lines 0 comments Download
M net/spdy/spdy_session.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M net/spdy/spdy_stream.h View 1 2 5 chunks +14 lines, -4 lines 0 comments Download
M net/spdy/spdy_stream.cc View 1 2 4 chunks +19 lines, -5 lines 0 comments Download
M net/spdy/spdy_stream_unittest.cc View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M net/spdy/spdy_test_util.h View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M net/spdy/spdy_test_util.cc View 1 2 3 1 chunk +29 lines, -0 lines 0 comments Download
M net/url_request/url_request.h View 1 2 3 4 5 1 chunk +3 lines, -4 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 5 1 chunk +4 lines, -8 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 1 chunk +6 lines, -7 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Satish
9 years, 10 months ago (2011-01-26 22:33:52 UTC) #1
Satish
http://codereview.chromium.org/6292013/diff/1/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/6292013/diff/1/net/base/upload_data_stream.cc#newcode72 net/base/upload_data_stream.cc:72: if (bytes_copied) This check is required because accessing "d[0]" ...
9 years, 10 months ago (2011-01-26 22:36:33 UTC) #2
willchan no longer on Chromium
My instinct here is that UploadDataStream isn't designed correctly for our needs. I think the ...
9 years, 10 months ago (2011-01-27 18:47:48 UTC) #3
Satish
http://codereview.chromium.org/6292013/diff/1/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/6292013/diff/1/net/base/upload_data_stream.cc#newcode72 net/base/upload_data_stream.cc:72: if (bytes_copied) On 2011/01/27 18:47:49, willchan wrote: > On ...
9 years, 10 months ago (2011-01-27 20:42:09 UTC) #4
willchan no longer on Chromium
http://codereview.chromium.org/6292013/diff/1/net/http/http_stream_parser.cc File net/http/http_stream_parser.cc (right): http://codereview.chromium.org/6292013/diff/1/net/http/http_stream_parser.cc#newcode276 net/http/http_stream_parser.cc:276: chunk_data_length_ : result); On 2011/01/27 20:42:09, Satish wrote: > ...
9 years, 10 months ago (2011-01-28 00:56:17 UTC) #5
Satish
http://codereview.chromium.org/6292013/diff/7002/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/6292013/diff/7002/net/base/upload_data_stream.cc#newcode72 net/base/upload_data_stream.cc:72: if (bytes_copied) I left this as is because we ...
9 years, 10 months ago (2011-01-28 17:37:51 UTC) #6
Satish
New patch uploaded, please take a look. Changing UploadDataStream to implement a GetNextBuffer() style interface ...
9 years, 10 months ago (2011-01-28 17:41:54 UTC) #7
willchan no longer on Chromium
http://codereview.chromium.org/6292013/diff/7002/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/6292013/diff/7002/net/base/upload_data_stream.cc#newcode72 net/base/upload_data_stream.cc:72: if (bytes_copied) On 2011/01/28 17:37:51, Satish wrote: > I ...
9 years, 10 months ago (2011-02-01 23:35:59 UTC) #8
Satish
Latest patch uploaded, I will add tests once the current questions get cleared below. Please ...
9 years, 10 months ago (2011-02-22 14:25:43 UTC) #9
willchan no longer on Chromium
Still looking, but wanted to send comments asap since I'm already way behind. Sorry for ...
9 years, 10 months ago (2011-02-24 19:03:39 UTC) #10
willchan no longer on Chromium
http://codereview.chromium.org/6292013/diff/20001/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/6292013/diff/20001/net/base/upload_data_stream.cc#newcode72 net/base/upload_data_stream.cc:72: if (bytes_copied) { Please add a comment for why ...
9 years, 10 months ago (2011-02-24 19:41:34 UTC) #11
Satish
I have addressed all the review comments and added a couple of unit tests for ...
9 years, 9 months ago (2011-03-02 14:42:23 UTC) #12
willchan no longer on Chromium
http://codereview.chromium.org/6292013/diff/20001/net/spdy/spdy_http_stream.cc File net/spdy/spdy_http_stream.cc (right): http://codereview.chromium.org/6292013/diff/20001/net/spdy/spdy_http_stream.cc#newcode287 net/spdy/spdy_http_stream.cc:287: *eof = false; On 2011/02/24 19:41:34, willchan wrote: > ...
9 years, 9 months ago (2011-03-02 18:44:40 UTC) #13
Satish
I have uploaded a new patch with the following major changes: - SPDY doesn't require ...
9 years, 9 months ago (2011-03-03 13:50:09 UTC) #14
willchan no longer on Chromium
http://codereview.chromium.org/6292013/diff/39001/net/base/upload_data.cc File net/base/upload_data.cc (right): http://codereview.chromium.org/6292013/diff/39001/net/base/upload_data.cc#newcode31 net/base/upload_data.cc:31: void UploadData::Element::SetToChunk(const char* bytes, int bytes_len, http://dev.chromium.org/developers/coding-style#Code_Formatting says: """ ...
9 years, 9 months ago (2011-03-03 19:47:47 UTC) #15
Satish
Thanks for the quick comments. I have addressed all style issues and some replies below. ...
9 years, 9 months ago (2011-03-03 22:21:43 UTC) #16
willchan no longer on Chromium
Sorry, it's not clear to me why you can't then add chunks that are over ...
9 years, 9 months ago (2011-03-03 22:26:54 UTC) #17
Satish
> Sorry, it's not clear to me why you can't then add chunks that are ...
9 years, 9 months ago (2011-03-03 22:35:31 UTC) #18
willchan no longer on Chromium
On Thu, Mar 3, 2011 at 2:35 PM, Satish Sampath <satish@chromium.org> wrote: >> Sorry, it's ...
9 years, 9 months ago (2011-03-03 22:40:16 UTC) #19
Satish
Makes sense. I couldn't use 16k in the tests because SPDY data frames have a ...
9 years, 9 months ago (2011-03-03 23:32:07 UTC) #20
willchan no longer on Chromium
Great! LGTM. http://codereview.chromium.org/6292013/diff/37026/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/6292013/diff/37026/net/base/upload_data_stream.cc#newcode156 net/base/upload_data_stream.cc:156: next_element_ == elements.size() && What's going on ...
9 years, 9 months ago (2011-03-03 23:42:32 UTC) #21
Satish
Thanks! http://codereview.chromium.org/6292013/diff/37026/net/base/upload_data_stream.cc File net/base/upload_data_stream.cc (right): http://codereview.chromium.org/6292013/diff/37026/net/base/upload_data_stream.cc#newcode156 net/base/upload_data_stream.cc:156: next_element_ == elements.size() && On 2011/03/03 23:42:32, willchan ...
9 years, 9 months ago (2011-03-03 23:50:58 UTC) #22
Satish
http://codereview.chromium.org/6292013/diff/37026/net/spdy/spdy_proxy_client_socket.cc File net/spdy/spdy_proxy_client_socket.cc (right): http://codereview.chromium.org/6292013/diff/37026/net/spdy/spdy_proxy_client_socket.cc#newcode502 net/spdy/spdy_proxy_client_socket.cc:502: NOTREACHED(); Looks like adding this was incorrect as SpdyStream ...
9 years, 9 months ago (2011-03-03 23:57:06 UTC) #23
willchan no longer on Chromium
9 years, 9 months ago (2011-03-04 00:02:55 UTC) #24
http://codereview.chromium.org/6292013/diff/37026/net/spdy/spdy_proxy_client_...
File net/spdy/spdy_proxy_client_socket.cc (right):

http://codereview.chromium.org/6292013/diff/37026/net/spdy/spdy_proxy_client_...
net/spdy/spdy_proxy_client_socket.cc:502: NOTREACHED();
On 2011/03/03 23:57:06, Satish wrote:
> Looks like adding this was incorrect as SpdyStream is calling this method when
> sending a request and detaching. SpdyStream doesn't know about the actual POST
> data so it can't call this method only for chunked POST data. Is it ok if I
> remove the check and leave the method empty?

OK

Powered by Google App Engine
This is Rietveld 408576698