[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

kenneth at webkit.org kenneth at webkit.org
Wed Apr 7 23:26:57 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 9462b12a37dc1a3ae58c537259ee824ddea3d170
Author: kenneth at webkit.org <kenneth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 9 17:26:26 2009 +0000

    2009-11-09  Yael Aharon  <yael.aharon at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Pass credentials provided by XMLHTTPRequest to the network request.
            https://bugs.webkit.org/show_bug.cgi?id=31208
    
            After r42483, the credentials are no longer passed to the network request
            in the URL of the request.
            Pass the credentials from XMLHTTPRequest to the network request, the same
            way that other ports do.
    
            After this patch LayoutTests/http/xmlhttprequest/basic-auth.html passes.
    
            * platform/network/qt/ResourceHandleQt.cpp:
            (WebCore::ResourceHandle::start):
            (WebCore::ResourceHandle::loadResourceSynchronously):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50662 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 53208fd..31e1f67 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2009-11-09  Yael Aharon  <yael.aharon at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Pass credentials provided by XMLHTTPRequest to the network request.
+        https://bugs.webkit.org/show_bug.cgi?id=31208
+
+        After r42483, the credentials are no longer passed to the network request
+        in the URL of the request.
+        Pass the credentials from XMLHTTPRequest to the network request, the same
+        way that other ports do.
+
+        After this patch LayoutTests/http/xmlhttprequest/basic-auth.html passes.
+
+        * platform/network/qt/ResourceHandleQt.cpp:
+        (WebCore::ResourceHandle::start):
+        (WebCore::ResourceHandle::loadResourceSynchronously):
+
 2009-11-09  Zoltan Horvath  <zoltan at webkit.org>
 
         Unreviewed.
diff --git a/WebCore/platform/network/qt/ResourceHandleQt.cpp b/WebCore/platform/network/qt/ResourceHandleQt.cpp
index f4c30c9..b3844bf 100644
--- a/WebCore/platform/network/qt/ResourceHandleQt.cpp
+++ b/WebCore/platform/network/qt/ResourceHandleQt.cpp
@@ -131,6 +131,15 @@ bool ResourceHandle::start(Frame* frame)
     if (!page)
         return false;
 
+    if (!(d->m_user.isEmpty() || d->m_pass.isEmpty())) {
+        // If credentials were specified for this request, add them to the url,
+        // so that they will be passed to QNetworkRequest.
+        KURL urlWithCredentials(d->m_request.url());
+        urlWithCredentials.setUser(d->m_user);
+        urlWithCredentials.setPass(d->m_pass);
+        d->m_request.setURL(urlWithCredentials);
+    }
+
     getInternal()->m_frame = static_cast<FrameLoaderClientQt*>(frame->loader()->client())->webFrame();
 #if QT_VERSION < 0x040400
     return QWebNetworkManager::self()->add(this, getInternal()->m_frame->page()->d->networkInterface);
@@ -204,6 +213,14 @@ void ResourceHandle::loadResourceSynchronously(const ResourceRequest& request, S
     }
 #else
     ResourceHandleInternal *d = handle.getInternal();
+    if (!(d->m_user.isEmpty() || d->m_pass.isEmpty())) {
+        // If credentials were specified for this request, add them to the url,
+        // so that they will be passed to QNetworkRequest.
+        KURL urlWithCredentials(d->m_request.url());
+        urlWithCredentials.setUser(d->m_user);
+        urlWithCredentials.setPass(d->m_pass);
+        d->m_request.setURL(urlWithCredentials);
+    }
     d->m_frame = static_cast<FrameLoaderClientQt*>(frame->loader()->client())->webFrame();
     d->m_job = new QNetworkReplyHandler(&handle, QNetworkReplyHandler::LoadNormal);
 #endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list