Changeset 84168 in webkit


Ignore:
Timestamp:
Apr 18, 2011 12:23:25 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-18 Andreas Kling <kling@webkit.org>

Reviewed by Adam Barth.

[Qt] DRT: Unbreak redirection of http:/ URLs.
https://bugs.webkit.org/show_bug.cgi?id=58779

  • platform/qt/Skipped: Unskip http/tests/loading/cross-origin-XHR-willLoadRequest.html

2011-04-18 Andreas Kling <kling@webkit.org>

Reviewed by Adam Barth.

REGRESSION (r84010): [Qt] DRT: Unbreak redirection of http:/ URLs.
https://bugs.webkit.org/show_bug.cgi?id=58779

KURL::host() doesn't return the host part of [broken] http:/ URLs, so use
QUrl instead to match the behavior of other ports.

  • WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::dispatchWillSendRequest):
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r84167 r84168  
     12011-04-18  Andreas Kling  <kling@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        [Qt] DRT: Unbreak redirection of http:/ URLs.
     6        https://bugs.webkit.org/show_bug.cgi?id=58779
     7
     8        * platform/qt/Skipped: Unskip http/tests/loading/cross-origin-XHR-willLoadRequest.html
     9
    1102011-04-18  Chris Rogers  <crogers@google.com>
    211
  • trunk/LayoutTests/platform/qt/Skipped

    r84139 r84168  
    34923492http/tests/inspector/network/download.html
    34933493http/tests/inspector/network/x-frame-options-deny.html
    3494 http/tests/loading/cross-origin-XHR-willLoadRequest.html
    34953494http/tests/misc/redirect-to-external-url.html
    34963495
  • trunk/Source/WebKit/qt/ChangeLog

    r84139 r84168  
     12011-04-18  Andreas Kling  <kling@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        REGRESSION (r84010): [Qt] DRT: Unbreak redirection of http:/ URLs.
     6        https://bugs.webkit.org/show_bug.cgi?id=58779
     7
     8        KURL::host() doesn't return the host part of [broken] http:/ URLs, so use
     9        QUrl instead to match the behavior of other ports.
     10
     11        * WebCoreSupport/FrameLoaderClientQt.cpp:
     12        (WebCore::FrameLoaderClientQt::dispatchWillSendRequest):
     13
    1142011-04-18  Dominic Cooney  <dominicc@chromium.org>
    215
  • trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

    r84057 r84168  
    10271027void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest& newRequest, const WebCore::ResourceResponse& redirectResponse)
    10281028{
    1029     KURL url = newRequest.url();
     1029    QUrl url = newRequest.url();
    10301030
    10311031    if (dumpResourceLoadCallbacks)
     
    10471047
    10481048    if (QWebPagePrivate::drtRun
    1049         && url.protocolInHTTPFamily()
    1050         && url.host() != "127.0.0.1"
    1051         && url.host() != "255.255.255.255"
    1052         && !equalIgnoringCase(url.host(), "localhost")) {
     1049        && url.isValid()
     1050        && (url.scheme().toLower() == QLatin1String("http") || url.scheme().toLower() == QLatin1String("https"))
     1051        && url.host() != QLatin1String("127.0.0.1")
     1052        && url.host() != QLatin1String("255.255.255.255")
     1053        && url.host().toLower() != QLatin1String("localhost")) {
    10531054
    10541055        printf("Blocked access to external URL %s\n", qPrintable(drtDescriptionSuitableForTestResult(url)));
     
    10611062
    10621063    if (QWebPagePrivate::drtRun) {
    1063         QMap<QString, QString>::const_iterator it = URLsToRedirect.constFind(url.string());
     1064        QMap<QString, QString>::const_iterator it = URLsToRedirect.constFind(url.toString());
    10641065        if (it != URLsToRedirect.constEnd())
    10651066            newRequest.setURL(QUrl(it.value()));
Note: See TracChangeset for help on using the changeset viewer.