[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jianli at chromium.org jianli at chromium.org
Wed Dec 22 13:00:00 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e7fd1c98ed2ba78ebb873a208d235cfe5d50ccc5
Author: jianli at chromium.org <jianli at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 3 21:59:13 2010 +0000

    REGRESSION (r66452): Sending of multipart forms with files is broken.
    https://bugs.webkit.org/show_bug.cgi?id=45159
    
    Reviewed by Darin Adler.
    
    WebCore:
    
    * platform/network/FormData.cpp:
    (WebCore::FormData::appendKeyValuePairItems):
    
    LayoutTests:
    
    Updated related tests to include dumping content type.
    
    * http/tests/local/formdata/send-form-data-expected.txt:
    * http/tests/local/formdata/send-form-data-with-sliced-file-expected.txt:
    * http/tests/local/formdata/upload-events-expected.txt:
    * http/tests/xmlhttprequest/resources/multipart-post-echo.php:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66773 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 4887e00..d65e08c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-03  Jian Li  <jianli at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (r66452): Sending of multipart forms with files is broken.
+        https://bugs.webkit.org/show_bug.cgi?id=45159
+
+        Updated related tests to include dumping content type.
+
+        * http/tests/local/formdata/send-form-data-expected.txt:
+        * http/tests/local/formdata/send-form-data-with-sliced-file-expected.txt:
+        * http/tests/local/formdata/upload-events-expected.txt:
+        * http/tests/xmlhttprequest/resources/multipart-post-echo.php:
+
 2010-09-03  Zhenyao Mo  <zmo at google.com>
 
         Unreviewed.
diff --git a/LayoutTests/http/tests/local/formdata/send-form-data-expected.txt b/LayoutTests/http/tests/local/formdata/send-form-data-expected.txt
index 6c789f6..b138c25 100644
--- a/LayoutTests/http/tests/local/formdata/send-form-data-expected.txt
+++ b/LayoutTests/http/tests/local/formdata/send-form-data-expected.txt
@@ -10,11 +10,11 @@ Sending FormData containing one file with empty name:
 Sending FormData containing one string:
 string=foo
 Sending FormData containing one file:
-file=file-for-drag-to-send.txt:1234567890
+file=file-for-drag-to-send.txt:text/plain:1234567890
 Sending FormData containing one string and one file:
-string1=foo&file1=file-for-drag-to-send.txt:1234567890
+string1=foo&file1=file-for-drag-to-send.txt:text/plain:1234567890
 Sending FormData containing two strings and two files:
-string1=foo&string2=bar&file1=file-for-drag-to-send.txt:1234567890&file2=file-for-drag-to-send.txt:1234567890
+string1=foo&string2=bar&file1=file-for-drag-to-send.txt:text/plain:1234567890&file2=file-for-drag-to-send.txt:text/plain:1234567890
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/http/tests/local/formdata/send-form-data-with-sliced-file-expected.txt b/LayoutTests/http/tests/local/formdata/send-form-data-with-sliced-file-expected.txt
index f7a50a4..3800e39 100644
--- a/LayoutTests/http/tests/local/formdata/send-form-data-with-sliced-file-expected.txt
+++ b/LayoutTests/http/tests/local/formdata/send-form-data-with-sliced-file-expected.txt
@@ -6,11 +6,11 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 Sending FormData containing one sliced file with empty name:
 
 Sending FormData containing one sliced file:
-file=Blob:23456
+file=Blob::23456
 Sending FormData containing one string and one sliced file:
-string1=foo&file1=Blob:23456
+string1=foo&file1=Blob::23456
 Sending FormData containing two strings and two sliced files:
-string1=foo&string2=bar&file1=Blob:23456&file2=Blob:45
+string1=foo&string2=bar&file1=Blob::23456&file2=Blob::45
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/http/tests/local/formdata/upload-events-expected.txt b/LayoutTests/http/tests/local/formdata/upload-events-expected.txt
index 5303190..bc76191 100644
--- a/LayoutTests/http/tests/local/formdata/upload-events-expected.txt
+++ b/LayoutTests/http/tests/local/formdata/upload-events-expected.txt
@@ -6,7 +6,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 loadstart event fired on XMLHttpRequestUpload: [object XMLHttpRequestProgressEvent]
 onprogress event fired on XMLHttpRequestUpload: [object XMLHttpRequestProgressEvent]
 load event fired on XMLHttpRequestUpload: [object XMLHttpRequestProgressEvent]
-string1=foo&file1=file-for-drag-to-send.txt:1234567890
+string1=foo&file1=file-for-drag-to-send.txt:text/plain:1234567890
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/http/tests/xmlhttprequest/resources/multipart-post-echo.php b/LayoutTests/http/tests/xmlhttprequest/resources/multipart-post-echo.php
index f43b588..9e7281b 100755
--- a/LayoutTests/http/tests/xmlhttprequest/resources/multipart-post-echo.php
+++ b/LayoutTests/http/tests/xmlhttprequest/resources/multipart-post-echo.php
@@ -21,7 +21,7 @@ foreach ($_FILES as $key => $value) {
             $content = fread($fp, $file['size']);
             fclose($fp);
         }
-        $values[] = $key . '=' . $file['name'] . ':' . $content;
+        $values[] = $key . '=' . $file['name'] . ':' . $file['type'] . ':' . $content;
     }
 }
 
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d9e6990..ef5fce4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-09-03  Jian Li  <jianli at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (r66452): Sending of multipart forms with files is broken.
+        https://bugs.webkit.org/show_bug.cgi?id=45159
+
+        * platform/network/FormData.cpp:
+        (WebCore::FormData::appendKeyValuePairItems):
+
 2010-09-03  Dominic Cooney  <dominicc at google.com>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/platform/network/FormData.cpp b/WebCore/platform/network/FormData.cpp
index 786f1b6..406a375 100644
--- a/WebCore/platform/network/FormData.cpp
+++ b/WebCore/platform/network/FormData.cpp
@@ -226,7 +226,7 @@ void FormData::appendKeyValuePairItems(const FormDataList& list, const TextEncod
                 FormDataBuilder::addFilenameToMultiPartHeader(header, encoding, name);
 
                 // Add the content type if it is available.
-                if (value.blob()->type().isEmpty())
+                if (!value.blob()->type().isEmpty())
                     FormDataBuilder::addContentTypeToMultiPartHeader(header, value.blob()->type().latin1());
             }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list