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

Issue 6881106: Treat ERR_CONNECTION_CLOSED as end-of-data marker for downloads. (Closed)

Created:
9 years, 8 months ago by ahendrickson
Modified:
9 years, 7 months ago
CC:
chromium-reviews, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Treat ERR_CONNECTION_CLOSED as end-of-data marker for downloads. BUG=79694 TEST=Download a torrent file from http://ca.isohunt.com. It should complete. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86472

Patch Set 1 #

Total comments: 1

Patch Set 2 : Changed to be specific to matching content-length to uncompressed size (preliminary). #

Patch Set 3 : Merged with trunk. #

Patch Set 4 : Fixed crash when there are no headers in the response. #

Patch Set 5 : http://ca.isohunt.com/download/271750433/test.torrent #

Patch Set 6 : Moved detection code to URLRequestHttpJob. #

Total comments: 11

Patch Set 7 : Fixed comment & decreased logging verbosity. #

Total comments: 4

Patch Set 8 : Moved GetResponseHeaderLines() to start of file. #

Patch Set 9 : Fixed the accounting for bytes read both pre- and post-filter. #

Patch Set 10 : Fixed issues with tracking number of bytes received & decompressed. #

Total comments: 11

Patch Set 11 : Adjustments per rvargas' comments. #

Total comments: 2

Patch Set 12 : Added unit test. #

Total comments: 1

Patch Set 13 : Removed commented-out code. #

Patch Set 14 : Added to error logging. #

Patch Set 15 : Removed windows-specific macro. #

Patch Set 16 : Forced logging on temporarily. #

Patch Set 17 : Added test file. #

Patch Set 18 : Changed testserver.py filter for compressed files. #

Patch Set 19 : Changed unit test to use a text file. #

Patch Set 20 : pick 91c11da Forced logging on again. #

Total comments: 3

Patch Set 21 : Changes per Will's comments. #

Patch Set 22 : Merged with trunk #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -12 lines) Patch
M chrome/browser/download/download_item.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_database.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 5 chunks +14 lines, -5 lines 0 comments Download
M content/browser/renderer_host/socket_stream_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
A net/data/url_request_unittest/BullRunSpeech.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +78 lines, -0 lines 0 comments Download
M net/http/http_stream_parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 3 chunks +25 lines, -0 lines 0 comments Download
M net/tools/testserver/testserver.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +68 lines, -0 lines 1 comment Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +22 lines, -1 line 0 comments Download
M net/url_request/url_request_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 19 7 chunks +27 lines, -4 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +48 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
ahendrickson
9 years, 8 months ago (2011-04-21 17:02:34 UTC) #1
ahendrickson
I thought about putting code into HttpStreamParser::DoReadBodyComplete() to deal with this, but I don't know ...
9 years, 8 months ago (2011-04-21 17:08:24 UTC) #2
darin (slow to review)
I'm pretty sure Mozilla handles this transparently at the HTTP layer. I think we should ...
9 years, 8 months ago (2011-04-21 17:13:38 UTC) #3
cbentzel
http://codereview.chromium.org/6881106/diff/1/chrome/browser/download/download_manager.cc File chrome/browser/download/download_manager.cc (right): http://codereview.chromium.org/6881106/diff/1/chrome/browser/download/download_manager.cc#newcode547 chrome/browser/download/download_manager.cc:547: if ((os_error == 0) || (os_error == net::ERR_CONNECTION_CLOSED)) { ...
9 years, 8 months ago (2011-04-21 17:16:41 UTC) #4
ahendrickson
Moved the detection code to URLRequestJob.
9 years, 7 months ago (2011-05-02 18:27:20 UTC) #5
ahendrickson
Ping
9 years, 7 months ago (2011-05-03 20:30:53 UTC) #6
Randy Smith (Not in Mondays)
The quick summary from me is that the substantive changes look good, but there strikes ...
9 years, 7 months ago (2011-05-03 21:30:41 UTC) #7
ahendrickson
+shess for the removal of a (massively outputting) log in the safe browsing code.
9 years, 7 months ago (2011-05-03 21:41:19 UTC) #8
Scott Hess - ex-Googler
http://codereview.chromium.org/6881106/diff/11001/chrome/browser/safe_browsing/safe_browsing_database.cc File chrome/browser/safe_browsing/safe_browsing_database.cc (left): http://codereview.chromium.org/6881106/diff/11001/chrome/browser/safe_browsing/safe_browsing_database.cc#oldcode452 chrome/browser/safe_browsing/safe_browsing_database.cc:452: DVLOG(3) << "Get store for list: " << list_id; ...
9 years, 7 months ago (2011-05-03 21:50:29 UTC) #9
ahendrickson
http://codereview.chromium.org/6881106/diff/11001/chrome/browser/safe_browsing/safe_browsing_database.cc File chrome/browser/safe_browsing/safe_browsing_database.cc (left): http://codereview.chromium.org/6881106/diff/11001/chrome/browser/safe_browsing/safe_browsing_database.cc#oldcode452 chrome/browser/safe_browsing/safe_browsing_database.cc:452: DVLOG(3) << "Get store for list: " << list_id; ...
9 years, 7 months ago (2011-05-04 15:08:24 UTC) #10
Randy Smith (Not in Mondays)
LGTM.
9 years, 7 months ago (2011-05-04 20:31:37 UTC) #11
ahendrickson
Ping
9 years, 7 months ago (2011-05-06 17:11:21 UTC) #12
ahendrickson
Adding Will Chan.
9 years, 7 months ago (2011-05-06 20:47:54 UTC) #13
ahendrickson
Ping
9 years, 7 months ago (2011-05-16 14:52:56 UTC) #14
darin (slow to review)
http://codereview.chromium.org/6881106/diff/18001/net/http/http_stream_parser.cc File net/http/http_stream_parser.cc (right): http://codereview.chromium.org/6881106/diff/18001/net/http/http_stream_parser.cc#newcode562 net/http/http_stream_parser.cc:562: static std::string GetResponseHeaderLines(const HttpResponseHeaders& headers) { it is usually ...
9 years, 7 months ago (2011-05-16 17:47:16 UTC) #15
ahendrickson
Darin, could you take a look at the code in url_request_http_job.cc? Thanks, Andy http://codereview.chromium.org/6881106/diff/18001/net/http/http_stream_parser.cc File ...
9 years, 7 months ago (2011-05-16 19:37:40 UTC) #16
ahendrickson
I believe that FireFox handles this case in: http://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/nsHttpConnection.cpp#509
9 years, 7 months ago (2011-05-16 19:38:49 UTC) #17
darin (slow to review)
On Mon, May 16, 2011 at 12:37 PM, <ahendrickson@chromium.org> wrote: > Darin, could you take ...
9 years, 7 months ago (2011-05-17 03:50:03 UTC) #18
Paweł Hajdan Jr.
I'm not familiar enough with this code to review it, removing myself from the list.
9 years, 7 months ago (2011-05-17 20:05:18 UTC) #19
ahendrickson
Fixed issues with the accounting for pre and post filter bytes.
9 years, 7 months ago (2011-05-18 16:10:35 UTC) #20
ahendrickson
rvargas, avi, and willchan, could you take a look at this? Thanks, Andy
9 years, 7 months ago (2011-05-18 23:05:50 UTC) #21
rvargas (doing something else)
We need a unit test at the URLRequestJob layer. http://codereview.chromium.org/6881106/diff/35002/net/http/http_stream_parser.cc File net/http/http_stream_parser.cc (right): http://codereview.chromium.org/6881106/diff/35002/net/http/http_stream_parser.cc#newcode22 net/http/http_stream_parser.cc:22: ...
9 years, 7 months ago (2011-05-19 19:30:36 UTC) #22
ahendrickson
Still looking at unit tests (url_request_unittest.cc). http://codereview.chromium.org/6881106/diff/35002/net/http/http_stream_parser.cc File net/http/http_stream_parser.cc (right): http://codereview.chromium.org/6881106/diff/35002/net/http/http_stream_parser.cc#newcode22 net/http/http_stream_parser.cc:22: static std::string GetResponseHeaderLines( ...
9 years, 7 months ago (2011-05-19 22:29:33 UTC) #23
rvargas (doing something else)
http://codereview.chromium.org/6881106/diff/40001/net/url_request/url_request_job.cc File net/url_request/url_request_job.cc (right): http://codereview.chromium.org/6881106/diff/40001/net/url_request/url_request_job.cc#newcode327 net/url_request/url_request_job.cc:327: VLOG(21) << __FUNCTION__ << "() " DVLOG. I'm still ...
9 years, 7 months ago (2011-05-21 01:24:49 UTC) #24
ahendrickson
Now have a unit test. http://codereview.chromium.org/6881106/diff/40001/net/url_request/url_request_job.cc File net/url_request/url_request_job.cc (right): http://codereview.chromium.org/6881106/diff/40001/net/url_request/url_request_job.cc#newcode327 net/url_request/url_request_job.cc:327: VLOG(21) << __FUNCTION__ << ...
9 years, 7 months ago (2011-05-22 06:43:34 UTC) #25
ahendrickson
Ping . . .
9 years, 7 months ago (2011-05-23 21:23:23 UTC) #26
ahendrickson
http://codereview.chromium.org/6881106/diff/50001/net/http/http_stream_parser.cc File net/http/http_stream_parser.cc (right): http://codereview.chromium.org/6881106/diff/50001/net/http/http_stream_parser.cc#newcode646 net/http/http_stream_parser.cc:646: << " headers = \"" << GetResponseHeaderLines(*response_->headers) On 2011/05/23 ...
9 years, 7 months ago (2011-05-24 04:58:37 UTC) #27
Avi (use Gerrit)
LGTM
9 years, 7 months ago (2011-05-24 18:00:40 UTC) #28
rvargas (doing something else)
LGTM http://codereview.chromium.org/6881106/diff/53003/net/tools/testserver/testserver.py File net/tools/testserver/testserver.py (right): http://codereview.chromium.org/6881106/diff/53003/net/tools/testserver/testserver.py#newcode811 net/tools/testserver/testserver.py:811: self.send_header('ETag', '\'' + file_path + '\'') nit: make ...
9 years, 7 months ago (2011-05-24 18:25:34 UTC) #29
commit-bot: I haz the power
9 years, 7 months ago (2011-05-24 20:14:43 UTC) #30
Change committed as 86472

Powered by Google App Engine
This is Rietveld 408576698