2008-01-03 Luca Bruno <lethalman88@gmail.com>
authoralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Jan 2008 11:04:04 +0000 (11:04 +0000)
committeralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Jan 2008 11:04:04 +0000 (11:04 +0000)
        Reviewed by Alp Toker.

        Fix HTTP POST-based logins to sites like Facebook, GMail by ensuring
        that the two POST methods don't conflict.

        * platform/network/curl/ResourceHandleManager.cpp:
        (WebCore::ResourceHandleManager::setupPOST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29119 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/network/curl/ResourceHandleManager.cpp

index e341cfb..46e49b2 100644 (file)
@@ -1,3 +1,13 @@
+2008-01-03  Luca Bruno  <lethalman88@gmail.com>
+
+        Reviewed by Alp Toker.
+
+        Fix HTTP POST-based logins to sites like Facebook, GMail by ensuring
+        that the two POST methods don't conflict.
+
+        * platform/network/curl/ResourceHandleManager.cpp:
+        (WebCore::ResourceHandleManager::setupPOST):
+
 2008-01-02  Darin Adler  <darin@apple.com>
 
         - touched some files to try to get the Windows buildbot building again
index a314f02..fbf4e1e 100644 (file)
@@ -297,10 +297,9 @@ void ResourceHandleManager::setupPOST(ResourceHandle* job)
 {
     ResourceHandleInternal* d = job->getInternal();
 
-    curl_easy_setopt(d->m_handle, CURLOPT_POST, TRUE);
-
     job->request().httpBody()->flatten(d->m_postBytes);
     if (d->m_postBytes.size() != 0) {
+        curl_easy_setopt(d->m_handle, CURLOPT_POST, TRUE);
         curl_easy_setopt(d->m_handle, CURLOPT_POSTFIELDSIZE, d->m_postBytes.size());
         curl_easy_setopt(d->m_handle, CURLOPT_POSTFIELDS, d->m_postBytes.data());
     }
@@ -330,7 +329,8 @@ void ResourceHandleManager::setupPOST(ResourceHandle* job)
         break;
     }
 
-    curl_easy_setopt(d->m_handle, CURLOPT_HTTPPOST, post);
+    if (post)
+      curl_easy_setopt(d->m_handle, CURLOPT_HTTPPOST, post);
 }
 
 void ResourceHandleManager::add(ResourceHandle* job)