Changeset 208416 in webkit


Ignore:
Timestamp:
Nov 5, 2016 12:56:49 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

[SOUP] Layout test http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html fails
https://bugs.webkit.org/show_bug.cgi?id=139358

Reviewed by Michael Catanzaro.

Source/WebKit2:

Stop putting the credentials in the URL unconditionally and ensure we only do that when provided by the URL
itself. Libsoup has its own cache of SoupAuth, so we don't need to pass user/pass in the URL for every single
request, libsoup will authenticate those automatically.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest):

LayoutTests:

  • platform/gtk/TestExpectations: Unskip http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r208412 r208416  
     12016-11-05  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [SOUP] Layout test http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html fails
     4        https://bugs.webkit.org/show_bug.cgi?id=139358
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * platform/gtk/TestExpectations: Unskip http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html.
     9
    1102016-11-04  Yusuke Suzuki  <utatane.tea@gmail.com>
    211
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r208300 r208416  
    23442344webkit.org/b/139354 fast/repaint/selection-ruby-rl.html [ Failure ]
    23452345
    2346 webkit.org/b/139358 http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html [ Failure ]
    2347 
    23482346webkit.org/b/139361 fast/css/data-attribute-style-sharing-5.html [ ImageOnlyFailure ]
    23492347webkit.org/b/139361 fast/css/data-attribute-style-sharing-6.html [ ImageOnlyFailure ]
  • trunk/Source/WebKit2/ChangeLog

    r208415 r208416  
     12016-11-05  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [SOUP] Layout test http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html fails
     4        https://bugs.webkit.org/show_bug.cgi?id=139358
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Stop putting the credentials in the URL unconditionally and ensure we only do that when provided by the URL
     9        itself. Libsoup has its own cache of SoupAuth, so we don't need to pass user/pass in the URL for every single
     10        request, libsoup will authenticate those automatically.
     11
     12        * NetworkProcess/soup/NetworkDataTaskSoup.cpp:
     13        (WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest):
     14
    1152016-11-04  Filip Pizlo  <fpizlo@apple.com>
    216
  • trunk/Source/WebKit2/NetworkProcess/soup/NetworkDataTaskSoup.cpp

    r208388 r208416  
    406406void NetworkDataTaskSoup::applyAuthenticationToRequest(ResourceRequest& request)
    407407{
    408     // We always put the credentials into the URL. In the Coca port HTTP family credentials are applied in
    409     // the didReceiveChallenge callback, but libsoup requires us to use this method to override
    410     // any previously remembered credentials. It has its own per-session credential storage.
     408    if (m_user.isEmpty() && m_password.isEmpty())
     409        return;
     410
    411411    auto url = request.url();
    412     if (!m_initialCredential.isEmpty()) {
    413         url.setUser(m_initialCredential.user());
    414         url.setPass(m_initialCredential.password());
    415     } else {
    416         url.setUser(m_user);
    417         url.setPass(m_password);
    418     }
     412    url.setUser(m_user);
     413    url.setPass(m_password);
     414    request.setURL(url);
    419415
    420416    m_user = String();
    421417    m_password = String();
    422 
    423     request.setURL(url);
    424418}
    425419
Note: See TracChangeset for help on using the changeset viewer.