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

Unified Diff: pdf/out_of_process_instance.cc

Issue 301223004: Fix loading PDFs with no HTTP response headers in OOP PDF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « pdf/document_loader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/out_of_process_instance.cc
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index ad1c656eef6f927fc00050b2e204efbc8333e4e8..49b14ee1c9e913680da93394bccd107011c0aed1 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -316,6 +316,12 @@ bool OutOfProcessInstance::Init(uint32_t argc,
headers = argv[i];
}
+ // TODO(raymes): This is a hack to ensure that if no headers are passed in
+ // then we get the right MIME type. When the in process plugin is removed we
+ // can fix the document loader properly and remove this hack.
+ if (!headers || strcmp(headers, "") == 0)
+ headers = "content-type: application/pdf";
+
if (!original_url)
return false;
« no previous file with comments | « pdf/document_loader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698