This version of the curl backend can register file handles with the platform event loop for platforms that support this like gtk.
Created attachment 19910 [details] Curl with file handles watched by event loop
Why do we need a second curl backend rather than improving the existing backend?
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.
Alp can you comment on this ?
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 !
Comment on attachment 20710 [details] Update patch after testing acid2 Supposedly Alp is a person who knows about Curl...
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");
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.
I know this patch is ancient, but this might be usable on the Win/Cairo build using the CFRunLoop infrastructure.
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!
(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.