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

Issue 2794683002: set content length limit if half open range request fails (Closed)

Created:
3 years, 8 months ago by qinmin
Modified:
3 years, 8 months ago
CC:
chromium-reviews, asanka, jam, kinuko+watch, darin-cc_chromium.org, blink-worker-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

set content length limit if half open range request fails If a range request fails, normally we should report an error. However, if the request is half open, it means we are reaching the end of the file. When resuming a download, we get the slice info from the history db. However, we cannot tell if the last slice has reached the end of the stream. As a result, a half open request is always sent. And this request can be used to determine the content length. BUG=644352 Review-Url: https://codereview.chromium.org/2794683002 Cr-Commit-Position: refs/heads/master@{#461595} Committed: https://chromium.googlesource.com/chromium/src/+/3ba57766474b9e525e858ae8382d8acbdec34039

Patch Set 1 #

Total comments: 8

Patch Set 2 : rename variable #

Total comments: 6

Patch Set 3 : new comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -31 lines) Patch
M content/browser/download/download_file.h View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/download/download_file_impl.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/download/download_file_impl.cc View 1 7 chunks +29 lines, -25 lines 0 comments Download
M content/browser/download/download_job.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/download/download_job.cc View 1 1 chunk +11 lines, -0 lines 0 comments Download
M content/browser/download/download_worker.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M content/browser/download/mock_download_file.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/download/parallel_download_job.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (7 generated)
qinmin
PTAL
3 years, 8 months ago (2017-03-31 21:53:25 UTC) #2
xingliu
https://codereview.chromium.org/2794683002/diff/1/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2794683002/diff/1/content/browser/download/download_file_impl.cc#newcode356 content/browser/download/download_file_impl.cc:356: << "Content length changed, the download might have updated."; ...
3 years, 8 months ago (2017-03-31 23:38:21 UTC) #3
qinmin
https://codereview.chromium.org/2794683002/diff/1/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2794683002/diff/1/content/browser/download/download_file_impl.cc#newcode356 content/browser/download/download_file_impl.cc:356: << "Content length changed, the download might have updated."; ...
3 years, 8 months ago (2017-04-01 05:20:02 UTC) #4
xingliu
lgtm. https://codereview.chromium.org/2794683002/diff/1/content/browser/download/download_file_impl.cc File content/browser/download/download_file_impl.cc (right): https://codereview.chromium.org/2794683002/diff/1/content/browser/download/download_file_impl.cc#newcode360 content/browser/download/download_file_impl.cc:360: content_length_limit_ = limit; On 2017/04/01 05:20:02, qinmin wrote: ...
3 years, 8 months ago (2017-04-03 16:51:56 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2794683002/20001
3 years, 8 months ago (2017-04-03 16:55:26 UTC) #7
David Trainor- moved to gerrit
https://codereview.chromium.org/2794683002/diff/20001/content/browser/download/download_file.h File content/browser/download/download_file.h (right): https://codereview.chromium.org/2794683002/diff/20001/content/browser/download/download_file.h#newcode78 content/browser/download/download_file.h:78: // Sets the potential file length. This can be ...
3 years, 8 months ago (2017-04-03 17:47:32 UTC) #8
qinmin
https://codereview.chromium.org/2794683002/diff/20001/content/browser/download/download_file.h File content/browser/download/download_file.h (right): https://codereview.chromium.org/2794683002/diff/20001/content/browser/download/download_file.h#newcode78 content/browser/download/download_file.h:78: // Sets the potential file length. This can be ...
3 years, 8 months ago (2017-04-03 18:33:11 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2794683002/40001
3 years, 8 months ago (2017-04-04 00:11:09 UTC) #13
commit-bot: I haz the power
3 years, 8 months ago (2017-04-04 01:16:30 UTC) #16
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/3ba57766474b9e525e858ae8382d...

Powered by Google App Engine
This is Rietveld 408576698