Title: [158277] trunk/Source/WebCore
- Revision
- 158277
- Author
- commit-qu...@webkit.org
- Date
- 2013-10-30 10:31:40 -0700 (Wed, 30 Oct 2013)
Log Message
[Curl] Cookies are sometimes not set in download request.
https://bugs.webkit.org/show_bug.cgi?id=123445
Patch by pe...@outlook.com <pe...@outlook.com> on 2013-10-30
Reviewed by Brent Fulgham.
Sometimes cookies are not set in the download request because the cookie file cannot be opened,
it's already been opened by the ResourceHandleManager for writing.
This can be fixed by getting the cookie list from the share handle in ResourceHandleManager instead.
This will also improve performance, as there is no need to read and parse the cookie file for each download.
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::init): Use share handle to get cookie list.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (158276 => 158277)
--- trunk/Source/WebCore/ChangeLog 2013-10-30 17:29:32 UTC (rev 158276)
+++ trunk/Source/WebCore/ChangeLog 2013-10-30 17:31:40 UTC (rev 158277)
@@ -1,3 +1,18 @@
+2013-10-30 pe...@outlook.com <pe...@outlook.com>
+
+ [Curl] Cookies are sometimes not set in download request.
+ https://bugs.webkit.org/show_bug.cgi?id=123445
+
+ Reviewed by Brent Fulgham.
+
+ Sometimes cookies are not set in the download request because the cookie file cannot be opened,
+ it's already been opened by the ResourceHandleManager for writing.
+ This can be fixed by getting the cookie list from the share handle in ResourceHandleManager instead.
+ This will also improve performance, as there is no need to read and parse the cookie file for each download.
+
+ * platform/network/curl/CurlDownload.cpp:
+ (WebCore::CurlDownload::init): Use share handle to get cookie list.
+
2013-10-30 ChangSeok Oh <changseok...@collabora.com>
Unguard Element::childShouldCreateRenderer
Modified: trunk/Source/WebCore/platform/network/curl/CurlDownload.cpp (158276 => 158277)
--- trunk/Source/WebCore/platform/network/curl/CurlDownload.cpp 2013-10-30 17:29:32 UTC (rev 158276)
+++ trunk/Source/WebCore/platform/network/curl/CurlDownload.cpp 2013-10-30 17:31:40 UTC (rev 158277)
@@ -28,6 +28,7 @@
#include "HTTPParsers.h"
#include "MainThreadTask.h"
+#include "ResourceHandleManager.h"
#include "ResourceRequest.h"
#include <wtf/MainThread.h>
#include <wtf/text/CString.h>
@@ -274,9 +275,9 @@
if (certPath)
curl_easy_setopt(m_curlHandle, CURLOPT_CAINFO, certPath);
- const char* cookieJarPath = getenv("CURL_COOKIE_JAR_PATH");
- if (cookieJarPath)
- curl_easy_setopt(m_curlHandle, CURLOPT_COOKIEFILE, cookieJarPath);
+ CURLSH* curlsh = ResourceHandleManager::sharedInstance()->getCurlShareHandle();
+ if (curlsh)
+ curl_easy_setopt(m_curlHandle, CURLOPT_SHARE, curlsh);
m_listener = listener;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes