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

Unified Diff: WebCore/xml/XMLHttpRequest.cpp

Issue 1769002: BlobBuilder/FormData refactor attempt (Closed)
Patch Set: back to simple FormData Created 10 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 | « WebCore/platform/network/mac/FormDataStreamMac.mm ('k') | WebKit/chromium/ChangeLog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/xml/XMLHttpRequest.cpp
diff --git a/WebCore/xml/XMLHttpRequest.cpp b/WebCore/xml/XMLHttpRequest.cpp
index 5cde24de29db44210001a3023244ca4ccd25cfbb..831ada9811213942a804864da57f0a39c4bcc28e 100644
--- a/WebCore/xml/XMLHttpRequest.cpp
+++ b/WebCore/xml/XMLHttpRequest.cpp
@@ -478,11 +478,7 @@ void XMLHttpRequest::send(Blob* body, ExceptionCode& ec)
// FIXME: Should we set a Content-Type if one is not set.
// FIXME: add support for uploading bundles.
m_requestEntityBody = FormData::create();
-#if ENABLE(BLOB_SLICE)
- m_requestEntityBody->appendFileRange(body->path(), body->start(), body->length(), body->modificationTime());
-#else
- m_requestEntityBody->appendFile(body->path(), false);
-#endif
+ m_requestEntityBody->appendItems(body->items());
}
createRequest(ec);
@@ -494,7 +490,7 @@ void XMLHttpRequest::send(DOMFormData* body, ExceptionCode& ec)
return;
if (m_method != "GET" && m_method != "HEAD" && m_url.protocolInHTTPFamily()) {
- m_requestEntityBody = FormData::createMultiPart(*body, document());
+ m_requestEntityBody = FormData::createMultiPart(body->items(), body->encoding(), document());
// We need to ask the client to provide the generated file names if needed. When FormData fills the element
// for the file, it could set a flag to use the generated file name, i.e. a package file on Mac.
« no previous file with comments | « WebCore/platform/network/mac/FormDataStreamMac.mm ('k') | WebKit/chromium/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698