Changeset 161549 in webkit


Ignore:
Timestamp:
Jan 9, 2014 12:05:00 AM (10 years ago)
Author:
Carlos Garcia Campos
Message:

REGRESSION(r161176): http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html is failing on GTK
https://bugs.webkit.org/show_bug.cgi?id=126518

Reviewed by Martin Robinson.

Source/WebCore:

Clear the credentials before calling willSendRequest on the client
to avoid sending the credentials to the API layer, but apply them
again to the request right before creating the new SoupRequest.

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::continueAfterWillSendRequest):
(WebCore::doRedirect):

LayoutTests:

Unskip
http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html
and http/tests/security/redirect-BLOCKED-to-localURL.html.

  • platform/gtk/TestExpectations:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r161541 r161549  
     12014-01-08  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        REGRESSION(r161176): http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html is failing on GTK
     4        https://bugs.webkit.org/show_bug.cgi?id=126518
     5
     6        Reviewed by Martin Robinson.
     7
     8        Unskip
     9        http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html
     10        and http/tests/security/redirect-BLOCKED-to-localURL.html.
     11
     12        * platform/gtk/TestExpectations:
     13
    1142014-01-08  Commit Queue  <commit-queue@webkit.org>
    215
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r161503 r161549  
    15311531webkit.org/b/126425 scrollbars/scrollbar-large-overflow-rectangle.html [ Failure ]
    15321532
    1533 webkit.org/b/126518 http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html [ Failure ]
    1534 webkit.org/b/126518 http/tests/security/redirect-BLOCKED-to-localURL.html [ Failure ]
    1535 
    15361533webkit.org/b/126519 inspector-protocol/model/highlight-shape-outside-margin.html [ Failure ]
    15371534
  • trunk/Source/WebCore/ChangeLog

    r161541 r161549  
     12014-01-08  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        REGRESSION(r161176): http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html is failing on GTK
     4        https://bugs.webkit.org/show_bug.cgi?id=126518
     5
     6        Reviewed by Martin Robinson.
     7
     8        Clear the credentials before calling willSendRequest on the client
     9        to avoid sending the credentials to the API layer, but apply them
     10        again to the request right before creating the new SoupRequest.
     11
     12        * platform/network/soup/ResourceHandleSoup.cpp:
     13        (WebCore::continueAfterWillSendRequest):
     14        (WebCore::doRedirect):
     15
    1162014-01-08  Commit Queue  <commit-queue@webkit.org>
    217
  • trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp

    r161338 r161549  
    456456}
    457457
    458 static void continueAfterWillSendRequest(ResourceHandle* handle, const ResourceRequest& newRequest)
     458static void continueAfterWillSendRequest(ResourceHandle* handle, const ResourceRequest& request)
    459459{
    460460    // willSendRequest might cancel the load.
     
    462462        return;
    463463
     464    ResourceRequest newRequest(request);
     465    ResourceHandleInternal* d = handle->getInternal();
     466    if (protocolHostAndPortAreEqual(newRequest.url(), d->m_response.url()))
     467        applyAuthenticationToRequest(handle, newRequest, true);
     468
    464469    if (!createSoupRequestAndMessageForHandle(handle, newRequest, true)) {
    465         handle->getInternal()->client()->cannotShowURL(handle);
     470        d->client()->cannotShowURL(handle);
    466471        return;
    467472    }
     
    514519        // TODO: We are losing any username and password specified in the redirect URL, as this is the
    515520        // same behavior as the CFNet port. We should investigate if this is really what we want.
    516     } else
    517         applyAuthenticationToRequest(handle, newRequest, true);
    518 
    519     // If we sent credentials with this request's URL, we don't want the response to carry them to
    520     // the WebKit layer. They were only placed in the URL for the benefit of libsoup.
    521     newRequest.removeCredentials();
     521    }
    522522
    523523    cleanupSoupRequestOperation(handle);
Note: See TracChangeset for help on using the changeset viewer.