[Webkit-unassigned] [Bug 18343] [GTK] Soup backend must handle upload of multiple files

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 7 14:07:44 PDT 2008


------- Comment #3 from danw at gnome.org  2008-04-07 14:07 PDT -------
ah, ok, you're right, you don't need SoupMultipart at all.

basically what you want to do is iterate over httpBody()->elements(), and
soup_message_body_append() each chunk to the request_body. (As far as I
understand the C++ bits, you should be able to use SOUP_MEMORY_TEMPORARY when
appending, because the pointers you pass will remain valid until after the
SoupMessage is destroyed. [This avoids needing to copy the data.]) For the
files to be uploaded, you can either read them into memory like in curl, or you
can copy the trick from libsoup/tests/simple-httpd.c of using mmap-based
SoupBuffers. You should also call "soup_message_body_set_accumulate
(msg->request_body, FALSE)", to tell libsoup that you don't need it to
concatenate everything together into msg->request_body->data for you when it's
done. (That's only available in libsoup 2.4.1, released today, so maybe forget
about that for now...)

Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list