2010-10-19 Sheriff Bot <webkit.review.bot@gmail.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Oct 2010 08:30:03 +0000 (08:30 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Oct 2010 08:30:03 +0000 (08:30 +0000)
        Unreviewed, rolling out r70034.
        http://trac.webkit.org/changeset/70034
        https://bugs.webkit.org/show_bug.cgi?id=47889

        "Gustavo's bot is lame" (Requested by xan_ on #webkit).

        * configure.ac:
2010-10-19  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r70034.
        http://trac.webkit.org/changeset/70034
        https://bugs.webkit.org/show_bug.cgi?id=47889

        "Gustavo's bot is lame" (Requested by xan_ on #webkit).

        * platform/network/soup/CookieJarSoup.cpp:
        (WebCore::defaultCookieJar):
        (WebCore::setCookies):
        * platform/network/soup/ResourceHandleSoup.cpp:
        (WebCore::ResourceHandle::prepareForURL):
        (WebCore::restartedCallback):
        (WebCore::startHttp):
        * platform/network/soup/ResourceRequestSoup.cpp:
        (WebCore::ResourceRequest::toSoupMessage):
        (WebCore::ResourceRequest::updateFromSoupMessage):

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

ChangeLog
WebCore/ChangeLog
WebCore/platform/network/soup/CookieJarSoup.cpp
WebCore/platform/network/soup/ResourceHandleSoup.cpp
WebCore/platform/network/soup/ResourceRequestSoup.cpp
configure.ac

index a3cdd17..c718e4e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-19  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r70034.
+        http://trac.webkit.org/changeset/70034
+        https://bugs.webkit.org/show_bug.cgi?id=47889
+
+        "Gustavo's bot is lame" (Requested by xan_ on #webkit).
+
+        * configure.ac:
+
 2010-10-19  Prof. MAAD  <himself@prof-maad.org>
 
         Reviewed by Xan Lopez.
index 80b7909..5953e92 100644 (file)
@@ -1,3 +1,22 @@
+2010-10-19  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r70034.
+        http://trac.webkit.org/changeset/70034
+        https://bugs.webkit.org/show_bug.cgi?id=47889
+
+        "Gustavo's bot is lame" (Requested by xan_ on #webkit).
+
+        * platform/network/soup/CookieJarSoup.cpp:
+        (WebCore::defaultCookieJar):
+        (WebCore::setCookies):
+        * platform/network/soup/ResourceHandleSoup.cpp:
+        (WebCore::ResourceHandle::prepareForURL):
+        (WebCore::restartedCallback):
+        (WebCore::startHttp):
+        * platform/network/soup/ResourceRequestSoup.cpp:
+        (WebCore::ResourceRequest::toSoupMessage):
+        (WebCore::ResourceRequest::updateFromSoupMessage):
+
 2010-10-19  Xan Lopez  <xlopez@igalia.com>
 
         Reviewed by Martin Robinson.
index e2c2f05..ba29622 100644 (file)
@@ -38,7 +38,9 @@ SoupCookieJar* defaultCookieJar()
         cookiesInitialized = true;
 
         cookieJar = soup_cookie_jar_new();
+#ifdef HAVE_LIBSOUP_2_29_90
         soup_cookie_jar_set_accept_policy(cookieJar, SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY);
+#endif
     }
 
     return cookieJar;
@@ -65,12 +67,18 @@ void setCookies(Document* document, const KURL& url, const String& value)
 
     GOwnPtr<SoupURI> origin(soup_uri_new(url.string().utf8().data()));
 
+#ifdef HAVE_LIBSOUP_2_29_90
     GOwnPtr<SoupURI> firstParty(soup_uri_new(document->firstPartyForCookies().string().utf8().data()));
 
     soup_cookie_jar_set_cookie_with_first_party(jar,
                                                 origin.get(),
                                                 firstParty.get(),
                                                 value.utf8().data());
+#else
+    soup_cookie_jar_set_cookie(jar,
+                               origin.get(),
+                               value.utf8().data());
+#endif
 }
 
 String cookies(const Document* /*document*/, const KURL& url)
index d50637a..05c659f 100644 (file)
@@ -146,10 +146,12 @@ ResourceHandle::~ResourceHandle()
 
 void ResourceHandle::prepareForURL(const KURL &url)
 {
+#ifdef HAVE_LIBSOUP_2_29_90
     GOwnPtr<SoupURI> soupURI(soup_uri_new(url.prettyURL().utf8().data()));
     if (!soupURI)
         return;
     soup_session_prepare_for_uri(ResourceHandle::defaultSession(), soupURI.get());
+#endif
 }
 
 // All other kinds of redirections, except for the *304* status code
@@ -203,12 +205,14 @@ static void restartedCallback(SoupMessage* msg, gpointer data)
     if (d->m_cancelled)
         return;
 
+#ifdef HAVE_LIBSOUP_2_29_90
     // Update the first party in case the base URL changed with the redirect
     String firstPartyString = request.firstPartyForCookies().string();
     if (!firstPartyString.isEmpty()) {
         GOwnPtr<SoupURI> firstParty(soup_uri_new(firstPartyString.utf8().data()));
         soup_message_set_first_party(d->m_soupMessage.get(), firstParty.get());
     }
+#endif
 }
 
 static void gotHeadersCallback(SoupMessage* msg, gpointer data)
@@ -583,11 +587,13 @@ static bool startHttp(ResourceHandle* handle)
     g_signal_connect(soupMessage, "content-sniffed", G_CALLBACK(contentSniffedCallback), handle);
     d->m_gotChunkHandler = g_signal_connect(soupMessage, "got-chunk", G_CALLBACK(gotChunkCallback), handle);
 
+#ifdef HAVE_LIBSOUP_2_29_90
     String firstPartyString = request.firstPartyForCookies().string();
     if (!firstPartyString.isEmpty()) {
         GOwnPtr<SoupURI> firstParty(soup_uri_new(firstPartyString.utf8().data()));
         soup_message_set_first_party(soupMessage, firstParty.get());
     }
+#endif
 
     FormData* httpBody = d->m_firstRequest.httpBody();
     if (httpBody && !httpBody->isEmpty()) {
index 774354f..380fc84 100644 (file)
@@ -70,11 +70,13 @@ SoupMessage* ResourceRequest::toSoupMessage() const
             soup_message_headers_append(soupHeaders, it->first.string().utf8().data(), it->second.utf8().data());
     }
 
+#ifdef HAVE_LIBSOUP_2_29_90
     String firstPartyString = firstPartyForCookies().string();
     if (!firstPartyString.isEmpty()) {
         GOwnPtr<SoupURI> firstParty(soup_uri_new(firstPartyString.utf8().data()));
         soup_message_set_first_party(soupMessage, firstParty.get());
     }
+#endif
 
     soup_message_set_flags(soupMessage, m_soupFlags);
 
@@ -103,11 +105,13 @@ void ResourceRequest::updateFromSoupMessage(SoupMessage* soupMessage)
     if (soupMessage->request_body->data)
         m_httpBody = FormData::create(soupMessage->request_body->data, soupMessage->request_body->length);
 
+#ifdef HAVE_LIBSOUP_2_29_90
     SoupURI* firstParty = soup_message_get_first_party(soupMessage);
     if (firstParty) {
         GOwnPtr<gchar> firstPartyURI(soup_uri_to_string(firstParty, FALSE));
         m_firstPartyForCookies = KURL(KURL(), String::fromUTF8(firstPartyURI.get()));
     }
+#endif
 
     m_soupFlags = soup_message_get_flags(soupMessage);
 
index d30700f..dffbe77 100644 (file)
@@ -247,7 +247,7 @@ if test "$with_hildon" = "yes"; then
 fi
 
 # minimum base dependencies
-LIBSOUP_REQUIRED_VERSION=2.30.0
+LIBSOUP_REQUIRED_VERSION=2.28.2
 CAIRO_REQUIRED_VERSION=1.6
 FONTCONFIG_REQUIRED_VERSION=2.4
 FREETYPE2_REQUIRED_VERSION=9.0
@@ -797,6 +797,15 @@ PKG_CHECK_MODULES([LIBSOUP],
 AC_SUBST([LIBSOUP_CFLAGS])
 AC_SUBST([LIBSOUP_LIBS])
 
+# check if we can use libSoup 2.29.90 features
+PKG_CHECK_MODULES([LIBSOUP_2_29_90],
+                  [libsoup-2.4 >= 2.29.90],
+                  [have_libsoup_2_29_90=yes],
+                  [have_libsoup_2_29_90=no])
+if test "$have_libsoup_2_29_90" = "yes"; then
+   AC_DEFINE([HAVE_LIBSOUP_2_29_90], 1, [Whether libSoup 2.29.90 features are available])
+fi
+
 # check if FreeType/FontConfig are available
 if test "$with_font_backend" = "freetype"; then
    if test "$with_target" = "directfb"; then