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

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

Issue 2827503002: Add extra headers argument so we don't pass headers in the body. (Closed)
Patch Set: Created 3 years, 8 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/mhtml_generation_manager.cc
diff --git a/content/browser/download/mhtml_generation_manager.cc b/content/browser/download/mhtml_generation_manager.cc
index 91392ce97a907037b53bfb313a1ad88656dad5e4..001d30d59f469fbfc9696f80015393a5d031b473 100644
--- a/content/browser/download/mhtml_generation_manager.cc
+++ b/content/browser/download/mhtml_generation_manager.cc
@@ -487,12 +487,13 @@ bool MHTMLGenerationManager::Job::WriteExtraDataParts(
// For each extra part, serialize that part and add to our accumulator
// string.
for (auto part : extra_data_parts) {
- // Write a newline, then a boundary, another newline, then the content
- // location, another newline, the content type, another newline, the another
- // newline, the extra data string, and end with a newline.
+ // Write a newline, then a boundary, a newline, then the content
+ // location, a newline, the content type, a newline, extra_headers,
+ // two newlines, the body, and end with a newline.
std::string serialized_extra_data_part = base::StringPrintf(
- "--%s\r\n%s%s\r\n%s%s\r\n%s\r\n", boundary.c_str(), kContentLocation,
- part.content_location.c_str(), kContentType, part.content_type.c_str(),
+ "--%s\r\n%s%s\r\n%s%s\r\n%s\r\n\r\n%s\r\n", boundary.c_str(),
+ kContentLocation, part.content_location.c_str(), kContentType,
+ part.content_type.c_str(), part.extra_headers.c_str(),
part.body.c_str());
DCHECK(base::IsStringASCII(serialized_extra_data_part));
« no previous file with comments | « content/browser/download/mhtml_generation_browsertest.cc ('k') | content/public/browser/mhtml_extra_parts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698