Changeset 138977 in webkit


Ignore:
Timestamp:
Jan 7, 2013 12:47:54 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Handle the new AuthRetry result code in NetworkJob::notifyAuthReceived
https://bugs.webkit.org/show_bug.cgi?id=106233

Patch by Joe Mason <jmason@rim.com> on 2013-01-07
Reviewed by Rob Buis.

Internal PR: 270683
FilterStream::notifyAuthReceived has a new result code, AuthRetry. When it's received we
need to handle it by resending the request with the same credentials.

Reviewed internally by Leo Yang.

  • platform/network/blackberry/NetworkJob.cpp:

(WebCore::NetworkJob::notifyAuthReceived):

  • platform/network/blackberry/NetworkJob.h:

(NetworkJob):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r138976 r138977  
     12013-01-07  Joe Mason  <jmason@rim.com>
     2
     3        [BlackBerry] Handle the new AuthRetry result code in NetworkJob::notifyAuthReceived
     4        https://bugs.webkit.org/show_bug.cgi?id=106233
     5
     6        Reviewed by Rob Buis.
     7
     8        Internal PR: 270683
     9        FilterStream::notifyAuthReceived has a new result code, AuthRetry. When it's received we
     10        need to handle it by resending the request with the same credentials.
     11
     12        Reviewed internally by Leo Yang.
     13
     14        * platform/network/blackberry/NetworkJob.cpp:
     15        (WebCore::NetworkJob::notifyAuthReceived):
     16        * platform/network/blackberry/NetworkJob.h:
     17        (NetworkJob):
     18
    1192013-01-07  Philip Rogers  <pdr@google.com>
    220
  • trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp

    r135867 r138977  
    253253}
    254254
    255 void NetworkJob::notifyAuthReceived(BlackBerry::Platform::NetworkRequest::AuthType authType, const char* realm, bool success, bool requireCredentials)
     255void NetworkJob::notifyAuthReceived(BlackBerry::Platform::NetworkRequest::AuthType authType, const char* realm, AuthResult result, bool requireCredentials)
    256256{
    257257    using BlackBerry::Platform::NetworkRequest;
     
    293293    }
    294294
    295     if (success) {
     295    // On success, update stored credentials if necessary
     296    // On failure, purge credentials and send new request
     297    // On retry, update stored credentials if necessary and send new request
     298    if (result == AuthResultFailure)
     299        purgeCredentials();
     300    else {
    296301        // Update the credentials that will be stored to match the scheme that was actually used
    297302        AuthenticationChallenge& challenge = m_handle->getInternal()->m_currentWebChallenge;
     
    308313        }
    309314        storeCredentials();
    310         return;
    311     }
    312 
    313     purgeCredentials();
    314     m_newJobWithCredentialsStarted = sendRequestWithCredentials(serverType, scheme, realm, requireCredentials);
     315    }
     316    if (result != AuthResultSuccess)
     317        m_newJobWithCredentialsStarted = sendRequestWithCredentials(serverType, scheme, realm, requireCredentials);
    315318}
    316319
  • trunk/Source/WebCore/platform/network/blackberry/NetworkJob.h

    r135867 r138977  
    7474    virtual void notifyHeadersReceived(const BlackBerry::Platform::NetworkRequest::HeaderList& headers);
    7575    virtual void notifyMultipartHeaderReceived(const char* key, const char* value);
    76     virtual void notifyAuthReceived(BlackBerry::Platform::NetworkRequest::AuthType, const char* realm, bool success, bool requireCredentials);
     76    virtual void notifyAuthReceived(BlackBerry::Platform::NetworkRequest::AuthType, const char* realm, AuthResult, bool requireCredentials);
    7777    // notifyStringHeaderReceived exists only to resolve ambiguity between char* and String parameters
    7878    void notifyStringHeaderReceived(const String& key, const String& value);
Note: See TracChangeset for help on using the changeset viewer.