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

Unified Diff: pdf/document_loader.cc

Issue 1705353002: Disable range requests if the origin ignores byte-range. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/document_loader.cc
diff --git a/pdf/document_loader.cc b/pdf/document_loader.cc
index f450503539065e32ec2d41cbf0f35b17376645e8..3117d08fffca10bf7df4495a24cc73671f59354b 100644
--- a/pdf/document_loader.cc
+++ b/pdf/document_loader.cc
@@ -383,7 +383,7 @@ void DocumentLoader::DidOpen(int32_t result) {
multipart_boundary_ = boundary;
} else {
// Need to make sure that the server returned a byte-range, since it's
- // possible for a server to just ignore our bye-range request and just
+ // possible for a server to just ignore our byte-range request and just
// return the entire document even if it supports byte-range requests.
// i.e. sniff response to
// http://www.act.org/compass/sample/pdf/geometry.pdf
@@ -393,6 +393,8 @@ void DocumentLoader::DidOpen(int32_t result) {
current_pos_ = start_pos;
if (end_pos && end_pos > start_pos)
current_chunk_size_ = end_pos - start_pos + 1;
+ } else {
+ partial_document_ = false;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698