Bug 16476 - [GTK] Use a platform http stack
Summary: [GTK] Use a platform http stack
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords: Curl, Gtk
Depends on:
Blocks:
 
Reported: 2007-12-17 07:59 PST by Alp Toker
Modified: 2008-03-17 05:45 PDT (History)
3 users (show)

See Also:


Attachments
Soup HTTP backend (22.24 KB, patch)
2008-03-11 04:25 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff
Soup HTTP backend (22.51 KB, patch)
2008-03-11 07:47 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff
Soup HTTP backend (22.75 KB, patch)
2008-03-11 09:25 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff
Add HTTP soup backend. (25.42 KB, patch)
2008-03-11 11:25 PDT, Xan Lopez
alp: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alp Toker 2007-12-17 07:59:54 PST
To integrate better with the underlying platform, the GTK+ port should use a shared http stack. This would provide cookie, cache and http functionality that can be shared between WebKit and other applications, allowing them to maintain state centrally.

Windows has WinINet, Mac has CFNetwork, and Qt just got an http stack but GTK+/Gnome lacks such a thing so we may have to write one.
Comment 1 Xan Lopez 2008-03-11 04:25:41 PDT
Created attachment 19659 [details]
Soup HTTP backend

First try at a soup http backend.

This is basically alp's patch from february-ish, changed to work in the new build system, adaptaded to all the API changes (review of the string stuff especially welcome...) and finished so it actually works (the code I got didn't really do anything, I had to finish the 'dataCallback' function).

The performance (throughput) difference with curl is massive, but I get some random crashers at the moment.
Comment 2 Xan Lopez 2008-03-11 07:47:38 PDT
Created attachment 19664 [details]
Soup HTTP backend

Second iteration.

Ported to libsoup 2.4 and some small fixes.

The crashes are still there, and we are sending malformed requests (I get status 400 from some servers).
Comment 3 Xan Lopez 2008-03-11 09:25:06 PDT
Created attachment 19668 [details]
Soup HTTP backend

Third iteration.

Do not call didReceiveData with empty data, and cancel requests on ::cancel both on soup side (soup_session_cancel_message) and WebCore (didFinishLoading). Now stopping a page load does not bork the session anymore.
Comment 4 Xan Lopez 2008-03-11 11:25:21 PDT
Created attachment 19670 [details]
Add HTTP soup backend.

Fourth iteration.

Took the parseDataUrl function from CURL backend, minor cleanups, added ChangeLog.
Comment 5 Alp Toker 2008-03-11 12:52:42 PDT
Comment on attachment 19670 [details]
Add HTTP soup backend.

r=me
Comment 6 Alp Toker 2008-03-11 16:27:31 PDT
Landed in r30970.