Title: [125022] trunk/Source/WebCore
Revision
125022
Author
commit-qu...@webkit.org
Date
2012-08-08 05:11:23 -0700 (Wed, 08 Aug 2012)

Log Message

[Blackberry] missing a Multipart header when m_multipartResponse is null
https://bugs.webkit.org/show_bug.cgi?id=93440

Patch by Chris Guan <chris.g...@torchmobile.com.cn> on 2012-08-08
Reviewed by George Staikos.

when m_multipartResponse is null, we just created new one but not called
setHTTPHeaderField. So we missed this received multipart Header. We should
call setHTTPHeaderField for each reveived header.

No new tests, because those current multipart test cases (http/tests/multipart/*)
are enough.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyMultipartHeaderReceived):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125021 => 125022)


--- trunk/Source/WebCore/ChangeLog	2012-08-08 11:56:44 UTC (rev 125021)
+++ trunk/Source/WebCore/ChangeLog	2012-08-08 12:11:23 UTC (rev 125022)
@@ -1,3 +1,20 @@
+2012-08-08  Chris Guan  <chris.g...@torchmobile.com.cn>
+
+        [Blackberry] missing a Multipart header when m_multipartResponse is null
+        https://bugs.webkit.org/show_bug.cgi?id=93440
+
+        Reviewed by George Staikos.
+
+        when m_multipartResponse is null, we just created new one but not called 
+        setHTTPHeaderField. So we missed this received multipart Header. We should 
+        call setHTTPHeaderField for each reveived header.
+
+        No new tests, because those current multipart test cases (http/tests/multipart/*) 
+        are enough.
+
+        * platform/network/blackberry/NetworkJob.cpp:
+        (WebCore::NetworkJob::handleNotifyMultipartHeaderReceived):
+
 2012-08-08  Mike West  <mk...@chromium.org>
 
         Refactor console logging out of CSPDirectiveList into ContentSecurityPolicy

Modified: trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp (125021 => 125022)


--- trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-08-08 11:56:44 UTC (rev 125021)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-08-08 12:11:23 UTC (rev 125022)
@@ -348,14 +348,14 @@
         }
 
         m_multipartResponse->setIsMultipartPayload(true);
-    } else {
-        if (key.lower() == "content-type") {
-            String contentType = value.lower();
-            m_multipartResponse->setMimeType(extractMIMETypeFromMediaType(contentType));
-            m_multipartResponse->setTextEncodingName(extractCharsetFromMediaType(contentType));
-        }
-        m_multipartResponse->setHTTPHeaderField(key, value);
     }
+
+    if (key.lower() == "content-type") {
+        String contentType = value.lower();
+        m_multipartResponse->setMimeType(extractMIMETypeFromMediaType(contentType));
+        m_multipartResponse->setTextEncodingName(extractCharsetFromMediaType(contentType));
+    }
+    m_multipartResponse->setHTTPHeaderField(key, value);
 }
 
 void NetworkJob::handleSetCookieHeader(const String& value)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to