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

Unified Diff: content/browser/download/parallel_download_job.cc

Issue 2786523002: Add control to use If-Range header for range request. (Closed)
Patch Set: Rebase. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/download/parallel_download_job.cc
diff --git a/content/browser/download/parallel_download_job.cc b/content/browser/download/parallel_download_job.cc
index 2ba903e62670efcf061dac0a4ccde7ea622a6d59..12fe15d1289fbcd10e1b4f4989aada03324ae308 100644
--- a/content/browser/download/parallel_download_job.cc
+++ b/content/browser/download/parallel_download_job.cc
@@ -188,6 +188,9 @@ void ParallelDownloadJob::CreateRequest(int64_t offset, int64_t length) {
// file.
download_params->set_length(length);
+ // Subsequent range requests don't need the "If-Range" header.
+ download_params->set_use_if_range(false);
qinmin 2017/03/30 05:21:43 still need this?
xingliu 2017/03/30 17:16:46 Yes, I think so. Precondition failed for initial
+
// Subsequent range requests have the same referrer URL as the original
// download request.
download_params->set_referrer(Referrer(download_item_->GetReferrerUrl(),

Powered by Google App Engine
This is Rietveld 408576698