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

Unified Diff: Source/core/html/DOMFormData.cpp

Issue 609733004: FormData allow empty names to append (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added issue title in description Created 6 years, 2 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 | « LayoutTests/http/tests/local/formdata/send-form-data-with-empty-name-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/DOMFormData.cpp
diff --git a/Source/core/html/DOMFormData.cpp b/Source/core/html/DOMFormData.cpp
index 92fb7695d5cb5641b7f7ca0bb310c061bcaf71b9..9379f8cc520a2d0bc7fc233515ef6b550811c903 100644
--- a/Source/core/html/DOMFormData.cpp
+++ b/Source/core/html/DOMFormData.cpp
@@ -58,14 +58,12 @@ DOMFormData::DOMFormData(HTMLFormElement* form)
void DOMFormData::append(const String& name, const String& value)
{
- if (!name.isEmpty())
- appendData(name, value);
+ appendData(name, value);
}
void DOMFormData::append(const String& name, Blob* blob, const String& filename)
{
- if (!name.isEmpty())
- appendBlob(name, blob, filename);
+ appendBlob(name, blob, filename);
}
} // namespace blink
« no previous file with comments | « LayoutTests/http/tests/local/formdata/send-form-data-with-empty-name-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698