FormData should allow setting filename to empty
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2013 18:25:10 +0000 (18:25 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2013 18:25:10 +0000 (18:25 +0000)
commit750923af7079baf4d3669907998e6879a36b7d2a
tree2f081d4a5915bd127dc8a76bbbf0c57ba72f91ca
parentc08334e61b6a90723491252b5af7589da8e849d1
    FormData should allow setting filename to empty
        https://bugs.webkit.org/show_bug.cgi?id=111687

        Reviewed by Brady Eidson.

        Tests: http/tests/local/formdata/send-form-data-with-empty-blob-filename.html
               http/tests/local/formdata/send-form-data-with-empty-file-filename.html

        * html/FileInputType.cpp: (WebCore::FileInputType::appendFormData):
        Use a Blob for empty file input, not a hacky File with empty path.

        * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems):
        Missing value is a null string. If the string is empty, we should treat is as
        authoritative.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/local/formdata/send-form-data-with-empty-blob-filename-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/local/formdata/send-form-data-with-empty-blob-filename.html [new file with mode: 0644]
LayoutTests/http/tests/local/formdata/send-form-data-with-empty-file-filename-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/local/formdata/send-form-data-with-empty-file-filename.html [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/resources/multipart-post-echo-filenames.php [new file with mode: 0644]
LayoutTests/platform/wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/html/FileInputType.cpp
Source/WebCore/platform/network/FormData.cpp