2009-03-06 Gustavo Noronha Silva <gns@gnome.org>
authorkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Mar 2009 16:35:13 +0000 (16:35 +0000)
committerkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Mar 2009 16:35:13 +0000 (16:35 +0000)
        Reviewed by Holger Freyther.

        https://bugs.webkit.org/show_bug.cgi?id=24423
        Use new soup_message_body_set_accumulate API in soup backend

        Replace use of deprecated SOUP_MESSAGE_OVERWRITE_CHUNKS flag with
        the new soup_message_body_set_accumulate API in soup.

        * platform/network/soup/ResourceHandleSoup.cpp:
        (WebCore::gotHeadersCallback):
        (WebCore::ResourceHandle::startHttp):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41482 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/network/soup/ResourceHandleSoup.cpp

index e0c8ab17457c3996e3da5d006b9ed1444bc67667..7d1e8739190788901d80b0801d55fcb09dea3f49 100644 (file)
@@ -1,3 +1,17 @@
+2009-03-06  Gustavo Noronha Silva  <gns@gnome.org>
+
+        Reviewed by Holger Freyther.
+
+        https://bugs.webkit.org/show_bug.cgi?id=24423
+        Use new soup_message_body_set_accumulate API in soup backend
+
+        Replace use of deprecated SOUP_MESSAGE_OVERWRITE_CHUNKS flag with
+        the new soup_message_body_set_accumulate API in soup.
+
+        * platform/network/soup/ResourceHandleSoup.cpp:
+        (WebCore::gotHeadersCallback):
+        (WebCore::ResourceHandle::startHttp):
+
 2009-03-06  Gustavo Noronha Silva  <gns@gnome.org>
 
         Reviewed by Holger Freyther.
index 2169450a83d2ee1536edcc0c6ade0caeb1f90ec3..f2799f3180cb6335be935b77acd7993c6ce109dd 100644 (file)
@@ -214,8 +214,6 @@ static void gotHeadersCallback(SoupMessage* msg, gpointer data)
     if (!SOUP_STATUS_IS_SUCCESSFUL(msg->status_code))
         return;
 
-    soup_message_set_flags(msg, SOUP_MESSAGE_OVERWRITE_CHUNKS);
-
     // We still don't know anything about Content-Type, so we will try
     // sniffing the contents of the file, and then report that we got
     // headers
@@ -506,6 +504,10 @@ bool ResourceHandle::startHttp(String urlString)
     d->m_msg = static_cast<SoupMessage*>(g_object_ref(msg));
     // balanced by a deref() in finishedCallback, which should always run
     ref();
+
+    // We handle each chunk ourselves, and we don't need msg->response_body
+    // to contain all of the data we got, when we finish downloading.
+    soup_message_body_set_accumulate(msg->response_body, FALSE);
     soup_session_queue_message(session, d->m_msg, finishedCallback, this);
 
     return true;