New issue
Advanced search Search tips

Issue 838627 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Parallel-download corrupted, unsupported range request writes whole file as chunk, leading to larger that original file

Reported by army.of....@gmail.com, May 1 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Example URL:
https://launchpad.net/veracrypt/trunk/1.22/+download/VeraCrypt_1.22.dmg

Steps to reproduce the problem:
set #enable-parallel-downloading to true

download file in reproduce url.

1. /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome  --temp-profile --user-data-dir=/tmp/temp-profile

2. set #enable-parallel-downloading to enabled

3. relaunch

4. download file https://launchpad.net/veracrypt/trunk/1.22/+download/VeraCrypt_1.22.dmg

5. see that around 19MiB are written, but original has only around 11MiB.

What is the expected behavior?
download file correctly.

What went wrong?
Download writes whole file as the second chunk into the file. This results in a larger than original downloaded file.

Did this work before? N/A 

Chrome version: 65.0.3325.181  Channel: n/a
OS Version: OS X 10.13.4
Flash Version:
 
Labels: Needs-Triage-M65
Components: -Internals>Network UI>Browser>Downloads
Labels: -Needs-Triage-M65 Needs-Milestone
Owner: qin...@chromium.org
Status: Assigned (was: Unconfirmed)
Min can you take a look?  Thanks!
Project Member

Comment 5 by bugdroid1@chromium.org, May 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/189d1033d966ab0795e5391c2c56838a7f4ce64a

commit 189d1033d966ab0795e5391c2c56838a7f4ce64a
Author: Min Qin <qinmin@chromium.org>
Date: Wed May 09 18:28:30 2018

Cancel parallel download request if server doesn't send partial response

If the server doesn't support partial responses, Chrome should cancel
parallel download requests.
These requests result in the wrong write offset and makes the file larger
than the original

BUG= 838627 

Change-Id: I1fa878854579a1572e6e2f90f3bb932b59b333ba
Reviewed-on: https://chromium-review.googlesource.com/1048130
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557252}
[modify] https://crrev.com/189d1033d966ab0795e5391c2c56838a7f4ce64a/components/download/internal/common/download_file_impl.cc
[modify] https://crrev.com/189d1033d966ab0795e5391c2c56838a7f4ce64a/components/download/internal/common/download_file_unittest.cc
[modify] https://crrev.com/189d1033d966ab0795e5391c2c56838a7f4ce64a/components/download/internal/common/download_item_impl.cc
[modify] https://crrev.com/189d1033d966ab0795e5391c2c56838a7f4ce64a/components/download/internal/common/download_job_factory.cc
[modify] https://crrev.com/189d1033d966ab0795e5391c2c56838a7f4ce64a/components/download/internal/common/download_worker.cc
[modify] https://crrev.com/189d1033d966ab0795e5391c2c56838a7f4ce64a/components/download/internal/common/download_worker.h
[modify] https://crrev.com/189d1033d966ab0795e5391c2c56838a7f4ce64a/components/download/internal/common/parallel_download_job.cc
[modify] https://crrev.com/189d1033d966ab0795e5391c2c56838a7f4ce64a/components/download/internal/common/parallel_download_job.h
[modify] https://crrev.com/189d1033d966ab0795e5391c2c56838a7f4ce64a/components/download/internal/common/parallel_download_job_unittest.cc
[modify] https://crrev.com/189d1033d966ab0795e5391c2c56838a7f4ce64a/content/browser/download/download_browsertest.cc
[modify] https://crrev.com/189d1033d966ab0795e5391c2c56838a7f4ce64a/content/public/test/test_download_http_response.cc
[modify] https://crrev.com/189d1033d966ab0795e5391c2c56838a7f4ce64a/content/public/test/test_download_http_response.h

Project Member

Comment 6 by bugdroid1@chromium.org, May 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/130774334da28312cc7f9fbbdecd8ad3bed9f9ee

commit 130774334da28312cc7f9fbbdecd8ad3bed9f9ee
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Thu May 10 10:17:56 2018

Revert "Cancel parallel download request if server doesn't send partial response"

This reverts commit 189d1033d966ab0795e5391c2c56838a7f4ce64a.

Reason for revert: "ParallelDownloadTest.NoPartialResponse" is flaky. See https://crbug.com/841666.

Original change's description:
> Cancel parallel download request if server doesn't send partial response
> 
> If the server doesn't support partial responses, Chrome should cancel
> parallel download requests.
> These requests result in the wrong write offset and makes the file larger
> than the original
> 
> BUG= 838627 
> 
> Change-Id: I1fa878854579a1572e6e2f90f3bb932b59b333ba
> Reviewed-on: https://chromium-review.googlesource.com/1048130
> Commit-Queue: Min Qin <qinmin@chromium.org>
> Reviewed-by: Xing Liu <xingliu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#557252}

TBR=qinmin@chromium.org,xingliu@chromium.org

Change-Id: I995c3c48fe39c535275a353130b10204009c5e30
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  838627 , 841666
Reviewed-on: https://chromium-review.googlesource.com/1053470
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557489}
[modify] https://crrev.com/130774334da28312cc7f9fbbdecd8ad3bed9f9ee/components/download/internal/common/download_file_impl.cc
[modify] https://crrev.com/130774334da28312cc7f9fbbdecd8ad3bed9f9ee/components/download/internal/common/download_file_unittest.cc
[modify] https://crrev.com/130774334da28312cc7f9fbbdecd8ad3bed9f9ee/components/download/internal/common/download_item_impl.cc
[modify] https://crrev.com/130774334da28312cc7f9fbbdecd8ad3bed9f9ee/components/download/internal/common/download_job_factory.cc
[modify] https://crrev.com/130774334da28312cc7f9fbbdecd8ad3bed9f9ee/components/download/internal/common/download_worker.cc
[modify] https://crrev.com/130774334da28312cc7f9fbbdecd8ad3bed9f9ee/components/download/internal/common/download_worker.h
[modify] https://crrev.com/130774334da28312cc7f9fbbdecd8ad3bed9f9ee/components/download/internal/common/parallel_download_job.cc
[modify] https://crrev.com/130774334da28312cc7f9fbbdecd8ad3bed9f9ee/components/download/internal/common/parallel_download_job.h
[modify] https://crrev.com/130774334da28312cc7f9fbbdecd8ad3bed9f9ee/components/download/internal/common/parallel_download_job_unittest.cc
[modify] https://crrev.com/130774334da28312cc7f9fbbdecd8ad3bed9f9ee/content/browser/download/download_browsertest.cc
[modify] https://crrev.com/130774334da28312cc7f9fbbdecd8ad3bed9f9ee/content/public/test/test_download_http_response.cc
[modify] https://crrev.com/130774334da28312cc7f9fbbdecd8ad3bed9f9ee/content/public/test/test_download_http_response.h

Project Member

Comment 7 by bugdroid1@chromium.org, May 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/05267e5edb3a2e33fcbb969a4318b0bd117d19b7

commit 05267e5edb3a2e33fcbb969a4318b0bd117d19b7
Author: Min Qin <qinmin@chromium.org>
Date: Fri May 11 00:09:36 2018

Reland "Cancel parallel download request if server doesn't send partial response"

This reverts commit 130774334da28312cc7f9fbbdecd8ad3bed9f9ee.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Cancel parallel download request if server doesn't send partial response"
> 
> This reverts commit 189d1033d966ab0795e5391c2c56838a7f4ce64a.
> 
> Reason for revert: "ParallelDownloadTest.NoPartialResponse" is flaky. See https://crbug.com/841666.
> 
> Original change's description:
> > Cancel parallel download request if server doesn't send partial response
> > 
> > If the server doesn't support partial responses, Chrome should cancel
> > parallel download requests.
> > These requests result in the wrong write offset and makes the file larger
> > than the original
> > 
> > BUG= 838627 
> > 
> > Change-Id: I1fa878854579a1572e6e2f90f3bb932b59b333ba
> > Reviewed-on: https://chromium-review.googlesource.com/1048130
> > Commit-Queue: Min Qin <qinmin@chromium.org>
> > Reviewed-by: Xing Liu <xingliu@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#557252}
> 
> TBR=qinmin@chromium.org,xingliu@chromium.org
> 
> Change-Id: I995c3c48fe39c535275a353130b10204009c5e30
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug:  838627 , 841666
> Reviewed-on: https://chromium-review.googlesource.com/1053470
> Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
> Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#557489}

TBR=yhirano@chromium.org,qinmin@chromium.org,xingliu@chromium.org

Change-Id: I47a2d4131efa8b863d9868eeca74e99d7beeaa8e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  838627 , 841666
Reviewed-on: https://chromium-review.googlesource.com/1054887
Reviewed-by: Min Qin <qinmin@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557734}
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/components/download/internal/common/download_file_impl.cc
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/components/download/internal/common/download_file_unittest.cc
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/components/download/internal/common/download_item_impl.cc
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/components/download/internal/common/download_job_factory.cc
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/components/download/internal/common/download_worker.cc
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/components/download/internal/common/download_worker.h
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/components/download/internal/common/parallel_download_job.cc
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/components/download/internal/common/parallel_download_job.h
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/components/download/internal/common/parallel_download_job_unittest.cc
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/content/browser/download/byte_stream_input_stream.cc
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/content/browser/download/byte_stream_input_stream.h
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/content/browser/download/download_browsertest.cc
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/content/public/test/test_download_http_response.cc
[modify] https://crrev.com/05267e5edb3a2e33fcbb969a4318b0bd117d19b7/content/public/test/test_download_http_response.h

Project Member

Comment 8 by bugdroid1@chromium.org, May 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e127247ef7e8c02498522c5e2e507cc8b39af278

commit e127247ef7e8c02498522c5e2e507cc8b39af278
Author: Max Morin <maxmorin@chromium.org>
Date: Fri May 11 10:12:39 2018

Revert "Reland "Cancel parallel download request if server doesn't send partial response""

This reverts commit 05267e5edb3a2e33fcbb969a4318b0bd117d19b7.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "Cancel parallel download request if server doesn't send partial response"
> 
> This reverts commit 130774334da28312cc7f9fbbdecd8ad3bed9f9ee.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Revert "Cancel parallel download request if server doesn't send partial response"
> > 
> > This reverts commit 189d1033d966ab0795e5391c2c56838a7f4ce64a.
> > 
> > Reason for revert: "ParallelDownloadTest.NoPartialResponse" is flaky. See https://crbug.com/841666.
> > 
> > Original change's description:
> > > Cancel parallel download request if server doesn't send partial response
> > > 
> > > If the server doesn't support partial responses, Chrome should cancel
> > > parallel download requests.
> > > These requests result in the wrong write offset and makes the file larger
> > > than the original
> > > 
> > > BUG= 838627 
> > > 
> > > Change-Id: I1fa878854579a1572e6e2f90f3bb932b59b333ba
> > > Reviewed-on: https://chromium-review.googlesource.com/1048130
> > > Commit-Queue: Min Qin <qinmin@chromium.org>
> > > Reviewed-by: Xing Liu <xingliu@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#557252}
> > 
> > TBR=qinmin@chromium.org,xingliu@chromium.org
> > 
> > Change-Id: I995c3c48fe39c535275a353130b10204009c5e30
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug:  838627 , 841666
> > Reviewed-on: https://chromium-review.googlesource.com/1053470
> > Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
> > Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#557489}
> 
> TBR=yhirano@chromium.org,qinmin@chromium.org,xingliu@chromium.org
> 
> Change-Id: I47a2d4131efa8b863d9868eeca74e99d7beeaa8e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug:  838627 , 841666
> Reviewed-on: https://chromium-review.googlesource.com/1054887
> Reviewed-by: Min Qin <qinmin@chromium.org>
> Commit-Queue: Min Qin <qinmin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#557734}

TBR=yhirano@chromium.org,qinmin@chromium.org,xingliu@chromium.org

Change-Id: I7a618b9533229ea1bb97ff65470e9c60fe580a49
No-Try: true
Bug:  838627 , 841666
Reviewed-on: https://chromium-review.googlesource.com/1053729
Reviewed-by: Max Morin <maxmorin@chromium.org>
Commit-Queue: Max Morin <maxmorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557834}
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/components/download/internal/common/download_file_impl.cc
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/components/download/internal/common/download_file_unittest.cc
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/components/download/internal/common/download_item_impl.cc
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/components/download/internal/common/download_job_factory.cc
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/components/download/internal/common/download_worker.cc
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/components/download/internal/common/download_worker.h
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/components/download/internal/common/parallel_download_job.cc
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/components/download/internal/common/parallel_download_job.h
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/components/download/internal/common/parallel_download_job_unittest.cc
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/content/browser/download/byte_stream_input_stream.cc
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/content/browser/download/byte_stream_input_stream.h
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/content/browser/download/download_browsertest.cc
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/content/public/test/test_download_http_response.cc
[modify] https://crrev.com/e127247ef7e8c02498522c5e2e507cc8b39af278/content/public/test/test_download_http_response.h

Project Member

Comment 9 by bugdroid1@chromium.org, May 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6682345bfdc63949ff35f771cbde0ea90852202e

commit 6682345bfdc63949ff35f771cbde0ea90852202e
Author: Min Qin <qinmin@chromium.org>
Date: Fri May 11 19:06:33 2018

Reland "Reland "Cancel parallel download request if server doesn't send partial response""

This reverts commit e127247ef7e8c02498522c5e2e507cc8b39af278.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Reland "Cancel parallel download request if server doesn't send partial response""
> 
> This reverts commit 05267e5edb3a2e33fcbb969a4318b0bd117d19b7.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Reland "Cancel parallel download request if server doesn't send partial response"
> > 
> > This reverts commit 130774334da28312cc7f9fbbdecd8ad3bed9f9ee.
> > 
> > Reason for revert: <INSERT REASONING HERE>
> > 
> > Original change's description:
> > > Revert "Cancel parallel download request if server doesn't send partial response"
> > > 
> > > This reverts commit 189d1033d966ab0795e5391c2c56838a7f4ce64a.
> > > 
> > > Reason for revert: "ParallelDownloadTest.NoPartialResponse" is flaky. See https://crbug.com/841666.
> > > 
> > > Original change's description:
> > > > Cancel parallel download request if server doesn't send partial response
> > > > 
> > > > If the server doesn't support partial responses, Chrome should cancel
> > > > parallel download requests.
> > > > These requests result in the wrong write offset and makes the file larger
> > > > than the original
> > > > 
> > > > BUG= 838627 
> > > > 
> > > > Change-Id: I1fa878854579a1572e6e2f90f3bb932b59b333ba
> > > > Reviewed-on: https://chromium-review.googlesource.com/1048130
> > > > Commit-Queue: Min Qin <qinmin@chromium.org>
> > > > Reviewed-by: Xing Liu <xingliu@chromium.org>
> > > > Cr-Commit-Position: refs/heads/master@{#557252}
> > > 
> > > TBR=qinmin@chromium.org,xingliu@chromium.org
> > > 
> > > Change-Id: I995c3c48fe39c535275a353130b10204009c5e30
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug:  838627 , 841666
> > > Reviewed-on: https://chromium-review.googlesource.com/1053470
> > > Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
> > > Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#557489}
> > 
> > TBR=yhirano@chromium.org,qinmin@chromium.org,xingliu@chromium.org
> > 
> > Change-Id: I47a2d4131efa8b863d9868eeca74e99d7beeaa8e
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug:  838627 , 841666
> > Reviewed-on: https://chromium-review.googlesource.com/1054887
> > Reviewed-by: Min Qin <qinmin@chromium.org>
> > Commit-Queue: Min Qin <qinmin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#557734}
> 
> TBR=yhirano@chromium.org,qinmin@chromium.org,xingliu@chromium.org
> 
> Change-Id: I7a618b9533229ea1bb97ff65470e9c60fe580a49
> No-Try: true
> Bug:  838627 , 841666
> Reviewed-on: https://chromium-review.googlesource.com/1053729
> Reviewed-by: Max Morin <maxmorin@chromium.org>
> Commit-Queue: Max Morin <maxmorin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#557834}

TBR=yhirano@chromium.org,qinmin@chromium.org,xingliu@chromium.org,maxmorin@chromium.org

Change-Id: I4a0d7eb869a61e38d01424427976121fe7f13384
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  838627 , 841666
Reviewed-on: https://chromium-review.googlesource.com/1055710
Reviewed-by: Min Qin <qinmin@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557969}
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/components/download/internal/common/download_file_impl.cc
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/components/download/internal/common/download_file_unittest.cc
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/components/download/internal/common/download_item_impl.cc
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/components/download/internal/common/download_job_factory.cc
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/components/download/internal/common/download_worker.cc
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/components/download/internal/common/download_worker.h
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/components/download/internal/common/parallel_download_job.cc
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/components/download/internal/common/parallel_download_job.h
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/components/download/internal/common/parallel_download_job_unittest.cc
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/content/browser/download/byte_stream_input_stream.cc
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/content/browser/download/byte_stream_input_stream.h
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/content/browser/download/download_browsertest.cc
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/content/public/test/test_download_http_response.cc
[modify] https://crrev.com/6682345bfdc63949ff35f771cbde0ea90852202e/content/public/test/test_download_http_response.h

Project Member

Comment 10 by bugdroid1@chromium.org, May 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1259cf8446247ad265dcbd611ec4bab7b91c9ba7

commit 1259cf8446247ad265dcbd611ec4bab7b91c9ba7
Author: Min Qin <qinmin@chromium.org>
Date: Fri May 11 19:08:27 2018

Revert "Reland "Reland "Cancel parallel download request if server doesn't send partial response"""

This reverts commit 6682345bfdc63949ff35f771cbde0ea90852202e.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "Reland "Cancel parallel download request if server doesn't send partial response""
> 
> This reverts commit e127247ef7e8c02498522c5e2e507cc8b39af278.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Revert "Reland "Cancel parallel download request if server doesn't send partial response""
> > 
> > This reverts commit 05267e5edb3a2e33fcbb969a4318b0bd117d19b7.
> > 
> > Reason for revert: <INSERT REASONING HERE>
> > 
> > Original change's description:
> > > Reland "Cancel parallel download request if server doesn't send partial response"
> > > 
> > > This reverts commit 130774334da28312cc7f9fbbdecd8ad3bed9f9ee.
> > > 
> > > Reason for revert: <INSERT REASONING HERE>
> > > 
> > > Original change's description:
> > > > Revert "Cancel parallel download request if server doesn't send partial response"
> > > > 
> > > > This reverts commit 189d1033d966ab0795e5391c2c56838a7f4ce64a.
> > > > 
> > > > Reason for revert: "ParallelDownloadTest.NoPartialResponse" is flaky. See https://crbug.com/841666.
> > > > 
> > > > Original change's description:
> > > > > Cancel parallel download request if server doesn't send partial response
> > > > > 
> > > > > If the server doesn't support partial responses, Chrome should cancel
> > > > > parallel download requests.
> > > > > These requests result in the wrong write offset and makes the file larger
> > > > > than the original
> > > > > 
> > > > > BUG= 838627 
> > > > > 
> > > > > Change-Id: I1fa878854579a1572e6e2f90f3bb932b59b333ba
> > > > > Reviewed-on: https://chromium-review.googlesource.com/1048130
> > > > > Commit-Queue: Min Qin <qinmin@chromium.org>
> > > > > Reviewed-by: Xing Liu <xingliu@chromium.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#557252}
> > > > 
> > > > TBR=qinmin@chromium.org,xingliu@chromium.org
> > > > 
> > > > Change-Id: I995c3c48fe39c535275a353130b10204009c5e30
> > > > No-Presubmit: true
> > > > No-Tree-Checks: true
> > > > No-Try: true
> > > > Bug:  838627 , 841666
> > > > Reviewed-on: https://chromium-review.googlesource.com/1053470
> > > > Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
> > > > Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
> > > > Cr-Commit-Position: refs/heads/master@{#557489}
> > > 
> > > TBR=yhirano@chromium.org,qinmin@chromium.org,xingliu@chromium.org
> > > 
> > > Change-Id: I47a2d4131efa8b863d9868eeca74e99d7beeaa8e
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug:  838627 , 841666
> > > Reviewed-on: https://chromium-review.googlesource.com/1054887
> > > Reviewed-by: Min Qin <qinmin@chromium.org>
> > > Commit-Queue: Min Qin <qinmin@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#557734}
> > 
> > TBR=yhirano@chromium.org,qinmin@chromium.org,xingliu@chromium.org
> > 
> > Change-Id: I7a618b9533229ea1bb97ff65470e9c60fe580a49
> > No-Try: true
> > Bug:  838627 , 841666
> > Reviewed-on: https://chromium-review.googlesource.com/1053729
> > Reviewed-by: Max Morin <maxmorin@chromium.org>
> > Commit-Queue: Max Morin <maxmorin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#557834}
> 
> TBR=yhirano@chromium.org,qinmin@chromium.org,xingliu@chromium.org,maxmorin@chromium.org
> 
> Change-Id: I4a0d7eb869a61e38d01424427976121fe7f13384
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug:  838627 , 841666
> Reviewed-on: https://chromium-review.googlesource.com/1055710
> Reviewed-by: Min Qin <qinmin@chromium.org>
> Commit-Queue: Min Qin <qinmin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#557969}

TBR=qinmin@chromium.org,xingliu@chromium.org

Change-Id: I6081079beaca50c3c9dc0fae53f665c68cd97eda
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  838627 , 841666
Reviewed-on: https://chromium-review.googlesource.com/1055482
Reviewed-by: Min Qin <qinmin@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557970}
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/components/download/internal/common/download_file_impl.cc
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/components/download/internal/common/download_file_unittest.cc
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/components/download/internal/common/download_item_impl.cc
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/components/download/internal/common/download_job_factory.cc
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/components/download/internal/common/download_worker.cc
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/components/download/internal/common/download_worker.h
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/components/download/internal/common/parallel_download_job.cc
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/components/download/internal/common/parallel_download_job.h
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/components/download/internal/common/parallel_download_job_unittest.cc
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/content/browser/download/byte_stream_input_stream.cc
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/content/browser/download/byte_stream_input_stream.h
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/content/browser/download/download_browsertest.cc
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/content/public/test/test_download_http_response.cc
[modify] https://crrev.com/1259cf8446247ad265dcbd611ec4bab7b91c9ba7/content/public/test/test_download_http_response.h

Project Member

Comment 11 by bugdroid1@chromium.org, May 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/925050149865e7c83acf2ea34970d38d1949cf95

commit 925050149865e7c83acf2ea34970d38d1949cf95
Author: Min Qin <qinmin@chromium.org>
Date: Tue May 15 19:18:12 2018

Cancel parallel download request if server doesn't send partial response

If the server doesn't support partial responses, Chrome should cancel
parallel download requests.
These requests result in the wrong write offset and makes the file larger
than the original

This is a Reland of the original CL. That CL fails because the BrowserTests
need to wait for the 2 cancelled requests, or tsan bots will complain.
There is no good way for ParallelDownloadJob to report cancelled requests.
So this CL uses the histogram to check if 2 failed AddStream attempt was
conducted.

BUG= 838627 

Change-Id: I856f31c23f2f08ed63e761656b0ed7fc6d6addc4
Reviewed-on: https://chromium-review.googlesource.com/1055852
Commit-Queue: Min Qin <qinmin@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558803}
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/components/download/internal/common/download_file_impl.cc
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/components/download/internal/common/download_file_unittest.cc
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/components/download/internal/common/download_item_impl.cc
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/components/download/internal/common/download_job_factory.cc
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/components/download/internal/common/download_worker.cc
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/components/download/internal/common/download_worker.h
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/components/download/internal/common/parallel_download_job.cc
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/components/download/internal/common/parallel_download_job.h
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/components/download/internal/common/parallel_download_job_unittest.cc
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/content/browser/download/byte_stream_input_stream.cc
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/content/browser/download/byte_stream_input_stream.h
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/content/browser/download/download_browsertest.cc
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/content/public/test/test_download_http_response.cc
[modify] https://crrev.com/925050149865e7c83acf2ea34970d38d1949cf95/content/public/test/test_download_http_response.h

Status: Fixed (was: Assigned)

Sign in to add a comment