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

Unified Diff: WebCore/platform/network/FormData.cpp

Issue 6077007: Merge 74427 - 2010-12-21 Jian Li <jianli@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years 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 | « LayoutTests/http/tests/local/resources/file.invalid ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/platform/network/FormData.cpp
===================================================================
--- WebCore/platform/network/FormData.cpp (revision 74516)
+++ WebCore/platform/network/FormData.cpp (working copy)
@@ -225,9 +225,13 @@
// We have to include the filename=".." part in the header, even if the filename is empty
FormDataBuilder::addFilenameToMultiPartHeader(header, encoding, name);
- // Add the content type if it is available.
- if (!value.blob()->type().isEmpty())
- FormDataBuilder::addContentTypeToMultiPartHeader(header, value.blob()->type().latin1());
+ // Add the content type if available, or "application/octet-stream" otherwise (RFC 1867).
+ String contentType;
+ if (value.blob()->type().isEmpty())
+ contentType = "application/octet-stream";
+ else
+ contentType = value.blob()->type();
+ FormDataBuilder::addContentTypeToMultiPartHeader(header, contentType.latin1());
}
FormDataBuilder::finishMultiPartHeader(header);
« no previous file with comments | « LayoutTests/http/tests/local/resources/file.invalid ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698