Title: [151441] trunk/Source/WebCore
- Revision
- 151441
- Author
- [email protected]
- Date
- 2013-06-11 09:37:14 -0700 (Tue, 11 Jun 2013)
Log Message
[curl] Custom HTTP method support
https://bugs.webkit.org/show_bug.cgi?id=117302
Patch by Peter Gal <[email protected]> on 2013-06-11
Reviewed by Kenneth Rohde Christiansen.
No new tests, already covered by existing ones like:
http/tests/xmlhttprequest/workers/methods.html
http/tests/xmlhttprequest/workers/methods-async.html
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (151440 => 151441)
--- trunk/Source/WebCore/ChangeLog 2013-06-11 15:32:18 UTC (rev 151440)
+++ trunk/Source/WebCore/ChangeLog 2013-06-11 16:37:14 UTC (rev 151441)
@@ -1,3 +1,17 @@
+2013-06-11 Peter Gal <[email protected]>
+
+ [curl] Custom HTTP method support
+ https://bugs.webkit.org/show_bug.cgi?id=117302
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ No new tests, already covered by existing ones like:
+ http/tests/xmlhttprequest/workers/methods.html
+ http/tests/xmlhttprequest/workers/methods-async.html
+
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::ResourceHandleManager::initializeHandle):
+
2013-06-11 Seokju Kwon <[email protected]>
Web Inspector: Remove 'using namespace std'
Modified: trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp (151440 => 151441)
--- trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp 2013-06-11 15:32:18 UTC (rev 151440)
+++ trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp 2013-06-11 16:37:14 UTC (rev 151441)
@@ -773,14 +773,19 @@
}
}
- if ("GET" == job->firstRequest().httpMethod())
+ String method = job->firstRequest().httpMethod();
+ if ("GET" == method)
curl_easy_setopt(d->m_handle, CURLOPT_HTTPGET, TRUE);
- else if ("POST" == job->firstRequest().httpMethod())
+ else if ("POST" == method)
setupPOST(job, &headers);
- else if ("PUT" == job->firstRequest().httpMethod())
+ else if ("PUT" == method)
setupPUT(job, &headers);
- else if ("HEAD" == job->firstRequest().httpMethod())
+ else if ("HEAD" == method)
curl_easy_setopt(d->m_handle, CURLOPT_NOBODY, TRUE);
+ else {
+ curl_easy_setopt(d->m_handle, CURLOPT_CUSTOMREQUEST, method.latin1().data());
+ setupPUT(job, &headers);
+ }
if (headers) {
curl_easy_setopt(d->m_handle, CURLOPT_HTTPHEADER, headers);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes