[webkit-dev] Cookies in GDK Port
zecke at selfish.org
Wed Jul 4 12:48:42 PDT 2007
Am 22.06.2007 um 16:26 schrieb sachin J Puranik:
> Basically file WebCore/platform/gdk/CookieJarGdk.cpp contains
> setCookies, cookies, enableCookies functions.
> Which are called from JS Core through Document->HTMLDocument.This i
> already know.
>>> From ResourceHandleManager I already checked and it is actully
>>> passing setings to curl along with the CallBackfunctions.
> It also facilitates to pass the CookieJar file name to curl ...and
> further curl maintains it. this also i checked earlier.
> So from my thinking curl is responsible for adding the cookies to
> the request and saving them in the file.
> But there are following problems...
> 1) I Gave the CookieJar file name to curl, and even file is
> created. Now if i Login to Gmail, Close the browser and Again try
> to load Gmail it's not opening.
> it is definitely due to problem in cookie handling.
> 2) If i Want to show the Available Cookies details to user , i can
> not do that , as file exists with curl.
> Please suggest me some architectural changes ..?? which solves my
> both the problems...??
> the solution you suggested earlier may not serve my purpose.
I just browsed the documentation of curl and stumbled across this part
Pass a file name as char *, zero terminated. This will make libcurl
write all internally known cookies to the specified file when
curl_easy_cleanup(3) is called."
And we never call curl_easy_cleanup, actually I make it call
curl_easy_cleanup but the d'tor of ResourceHandleManager is never
called. The question is how to call curl_easy_cleanup without
interfering with pending requests.
What about you sharing some ideas on how to solve this problem?
One of the obvious solutions is to call cleanup when all pending
operations are done and then create a new one. The danger is
"starving", to avoid this we could hot-swap but risk losing a cookie
on this way. Looking forward for your ideas.
More information about the webkit-dev