Title: [141464] trunk/Source/WebCore
Revision
141464
Author
[email protected]
Date
2013-01-31 12:44:11 -0800 (Thu, 31 Jan 2013)

Log Message

[Curl] There is no way for a WebKit client to set the Curl cookie jar path
https://bugs.webkit.org/show_bug.cgi?id=107692

Patch by [email protected] <[email protected]> on 2013-01-31
Reviewed by Brent Fulgham.

Set default cookie jar path.
Get the cookie jar path for Curl from the environment variable CURL_COOKIE_JAR_PATH.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::cookieJarPath): Added helper function to set cookie jar path.
(WebCore::ResourceHandleManager::ResourceHandleManager): Call helper function.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (141463 => 141464)


--- trunk/Source/WebCore/ChangeLog	2013-01-31 20:41:21 UTC (rev 141463)
+++ trunk/Source/WebCore/ChangeLog	2013-01-31 20:44:11 UTC (rev 141464)
@@ -1,3 +1,17 @@
+2013-01-31  [email protected]  <[email protected]>
+
+        [Curl] There is no way for a WebKit client to set the Curl cookie jar path
+        https://bugs.webkit.org/show_bug.cgi?id=107692
+
+        Reviewed by Brent Fulgham.
+
+        Set default cookie jar path.
+        Get the cookie jar path for Curl from the environment variable CURL_COOKIE_JAR_PATH.
+
+        * platform/network/curl/ResourceHandleManager.cpp:
+        (WebCore::cookieJarPath): Added helper function to set cookie jar path.
+        (WebCore::ResourceHandleManager::ResourceHandleManager): Call helper function.
+
 2013-01-31  Maciej Stachowiak  <[email protected]>
 
         REGRESSION (r138962): Fails to show "confirm form resubmission", hangs browser

Modified: trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp (141463 => 141464)


--- trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp	2013-01-31 20:41:21 UTC (rev 141463)
+++ trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp	2013-01-31 20:44:11 UTC (rev 141464)
@@ -84,6 +84,15 @@
     return CString();
 }
 
+static char* cookieJarPath()
+{
+    char* cookieJarPath = getenv("CURL_COOKIE_JAR_PATH");
+    if (cookieJarPath)
+        return fastStrDup(cookieJarPath);
+
+    return fastStrDup("cookies.dat");
+}
+
 static Mutex* sharedResourceMutex(curl_lock_data data) {
     DEFINE_STATIC_LOCAL(Mutex, cookieMutex, ());
     DEFINE_STATIC_LOCAL(Mutex, dnsMutex, ());
@@ -119,7 +128,7 @@
 
 ResourceHandleManager::ResourceHandleManager()
     : m_downloadTimer(this, &ResourceHandleManager::downloadTimerCallback)
-    , m_cookieJarFileName(0)
+    , m_cookieJarFileName(cookieJarPath())
     , m_certificatePath (certificatePath())
     , m_runningJobs(0)
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to