NEW 17972
[Curl] Rewrite of curl backend to run in event loop
https://bugs.webkit.org/show_bug.cgi?id=17972
Summary [Curl] Rewrite of curl backend to run in event loop
Michael Emmel
Reported 2008-03-20 15:18:13 PDT
This version of the curl backend can register file handles with the platform event loop for platforms that support this like gtk.
Attachments
Curl with file handles watched by event loop (49.51 KB, patch)
2008-03-20 15:19 PDT, Michael Emmel
no flags
Update patch after testing acid2 (53.29 KB, patch)
2008-04-20 17:05 PDT, Michael Emmel
jmalonzo: review-
Michael Emmel
Comment 1 2008-03-20 15:19:06 PDT
Created attachment 19910 [details] Curl with file handles watched by event loop
Mark Rowe (bdash)
Comment 2 2008-03-23 18:24:26 PDT
Why do we need a second curl backend rather than improving the existing backend?
Michael Emmel
Comment 3 2008-03-23 20:20:55 PDT
The biggest reason is Alp Toker said he wanted it this way to bring it in. Primarily so the old backend can be used as a fallback during transition and give time for other ports using the curl backend to support the new interface. Since it fallbacks to polling if no manager is registered we should be able to switch and remove the old one fairly quickly.
Michael Emmel
Comment 4 2008-03-26 14:19:40 PDT
Alp can you comment on this ?
Michael Emmel
Comment 5 2008-04-20 17:05:23 PDT
Created attachment 20710 [details] Update patch after testing acid2 Add changelog several bug fixes to make patch work with acid2. Works in polling and registered file handle mode. Finally curl frees resources !
Eric Seidel (no email)
Comment 6 2008-08-25 20:58:10 PDT
Comment on attachment 20710 [details] Update patch after testing acid2 Supposedly Alp is a person who knows about Curl...
Michael Emmel
Comment 7 2008-08-25 23:54:05 PDT
If someone is willing to review this I have one small change thats floating about. --- WebKit-r34342-orig/WebCore/platform/network/ncurl/ResourceHandleInternalCurl.cpp 2008-07-02 16:26:30.000000000 +0000 +++ WebKit-r34342/WebCore/platform/network/ncurl/ResourceHandleInternalCurl.cpp @@ -659,7 +669,7 @@ return; m_request.setHTTPHeaderField("PropagateHttpHeader", "true"); - m_request.setHTTPContentType("Content-Type: application/x-www-form-urlencoded"); + m_request.setHTTPContentType("application/x-www-form-urlencoded");
Holger Freyther
Comment 8 2008-11-03 07:27:38 PST
Yes, it is on my mind, but it will take some more time though. I want to get parts of the test suite running before adding and switching to a new backend.
Brent Fulgham
Comment 9 2009-06-15 21:58:39 PDT
I know this patch is ancient, but this might be usable on the Win/Cairo build using the CFRunLoop infrastructure.
Jan Alonzo
Comment 10 2009-07-31 21:04:51 PDT
Comment on attachment 20710 [details] Update patch after testing acid2 Thanks for the patch. This patch needs to be updated and made standalone regardless of port by removing the Gtk related changes, as the Gtk port is now using libsoup as the sole backend. Other ports may benefit from these enhancements and would be nice if a port maintainer interested can follow it through. Thanks again for the patch!
Michael Emmel
Comment 11 2009-07-31 21:59:04 PDT
(In reply to comment #10) > (From update of attachment 20710 [details]) > Thanks for the patch. This patch needs to be updated and made standalone > regardless of port by removing the Gtk related changes, as the Gtk port is now > using libsoup as the sole backend. Other ports may benefit from these > enhancements and would be nice if a port maintainer interested can follow it > through. > > Thanks again for the patch! Wow this patch is over a year old now :) I don't have any plans to rework it myself. There are new hooks for running in the main loop which should allow this to be done in a generic fashion. If they don't work they should work. I've since moved on to using neon as my core http lib so I'm no longer using curl.
Note You need to log in before you can comment on or make changes to this bug.