Title: [138977] trunk/Source/WebCore
- Revision
- 138977
- Author
- commit-qu...@webkit.org
- Date
- 2013-01-07 12:47:54 -0800 (Mon, 07 Jan 2013)
Log Message
[BlackBerry] Handle the new AuthRetry result code in NetworkJob::notifyAuthReceived
https://bugs.webkit.org/show_bug.cgi?id=106233
Patch by Joe Mason <jma...@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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (138976 => 138977)
--- trunk/Source/WebCore/ChangeLog 2013-01-07 20:33:53 UTC (rev 138976)
+++ trunk/Source/WebCore/ChangeLog 2013-01-07 20:47:54 UTC (rev 138977)
@@ -1,3 +1,21 @@
+2013-01-07 Joe Mason <jma...@rim.com>
+
+ [BlackBerry] Handle the new AuthRetry result code in NetworkJob::notifyAuthReceived
+ https://bugs.webkit.org/show_bug.cgi?id=106233
+
+ 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):
+
2013-01-07 Philip Rogers <p...@google.com>
Clear pending container size requests as early as possible
Modified: trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp (138976 => 138977)
--- trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp 2013-01-07 20:33:53 UTC (rev 138976)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp 2013-01-07 20:47:54 UTC (rev 138977)
@@ -252,7 +252,7 @@
handleNotifyMultipartHeaderReceived(key, value);
}
-void NetworkJob::notifyAuthReceived(BlackBerry::Platform::NetworkRequest::AuthType authType, const char* realm, bool success, bool requireCredentials)
+void NetworkJob::notifyAuthReceived(BlackBerry::Platform::NetworkRequest::AuthType authType, const char* realm, AuthResult result, bool requireCredentials)
{
using BlackBerry::Platform::NetworkRequest;
@@ -292,7 +292,12 @@
return;
}
- if (success) {
+ // On success, update stored credentials if necessary
+ // On failure, purge credentials and send new request
+ // On retry, update stored credentials if necessary and send new request
+ if (result == AuthResultFailure)
+ purgeCredentials();
+ else {
// Update the credentials that will be stored to match the scheme that was actually used
AuthenticationChallenge& challenge = m_handle->getInternal()->m_currentWebChallenge;
if (!challenge.isNull()) {
@@ -307,11 +312,9 @@
}
}
storeCredentials();
- return;
}
-
- purgeCredentials();
- m_newJobWithCredentialsStarted = sendRequestWithCredentials(serverType, scheme, realm, requireCredentials);
+ if (result != AuthResultSuccess)
+ m_newJobWithCredentialsStarted = sendRequestWithCredentials(serverType, scheme, realm, requireCredentials);
}
void NetworkJob::notifyStringHeaderReceived(const String& key, const String& value)
Modified: trunk/Source/WebCore/platform/network/blackberry/NetworkJob.h (138976 => 138977)
--- trunk/Source/WebCore/platform/network/blackberry/NetworkJob.h 2013-01-07 20:33:53 UTC (rev 138976)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkJob.h 2013-01-07 20:47:54 UTC (rev 138977)
@@ -73,7 +73,7 @@
void handleNotifyStatusReceived(int status, const String& message);
virtual void notifyHeadersReceived(const BlackBerry::Platform::NetworkRequest::HeaderList& headers);
virtual void notifyMultipartHeaderReceived(const char* key, const char* value);
- virtual void notifyAuthReceived(BlackBerry::Platform::NetworkRequest::AuthType, const char* realm, bool success, bool requireCredentials);
+ virtual void notifyAuthReceived(BlackBerry::Platform::NetworkRequest::AuthType, const char* realm, AuthResult, bool requireCredentials);
// notifyStringHeaderReceived exists only to resolve ambiguity between char* and String parameters
void notifyStringHeaderReceived(const String& key, const String& value);
void handleNotifyHeaderReceived(const String& key, const String& value);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes