Title: [118799] trunk/Source/WebCore
- Revision
- 118799
- Author
- [email protected]
- Date
- 2012-05-29 09:57:19 -0700 (Tue, 29 May 2012)
Log Message
[BlackBerry] http authentication challenge issue when loading subresource
https://bugs.webkit.org/show_bug.cgi?id=87660
Patch by Jonathan Dong <[email protected]> on 2012-05-29
Reviewed by Rob Buis.
We should try to store the credential information as soon as we
receive http status notification which indicates that the
authentication succeeds, instead of storing credentials when the
main resource receives notify done which is too late for loading
subresource.
Internally reviewed by Joe Mason <[email protected]>
No new tests since there is no change in behavior.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyStatusReceived):
(WebCore::NetworkJob::handleNotifyClose):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (118798 => 118799)
--- trunk/Source/WebCore/ChangeLog 2012-05-29 16:52:42 UTC (rev 118798)
+++ trunk/Source/WebCore/ChangeLog 2012-05-29 16:57:19 UTC (rev 118799)
@@ -1,3 +1,24 @@
+2012-05-29 Jonathan Dong <[email protected]>
+
+ [BlackBerry] http authentication challenge issue when loading subresource
+ https://bugs.webkit.org/show_bug.cgi?id=87660
+
+ Reviewed by Rob Buis.
+
+ We should try to store the credential information as soon as we
+ receive http status notification which indicates that the
+ authentication succeeds, instead of storing credentials when the
+ main resource receives notify done which is too late for loading
+ subresource.
+
+ Internally reviewed by Joe Mason <[email protected]>
+
+ No new tests since there is no change in behavior.
+
+ * platform/network/blackberry/NetworkJob.cpp:
+ (WebCore::NetworkJob::handleNotifyStatusReceived):
+ (WebCore::NetworkJob::handleNotifyClose):
+
2012-05-29 Alexey Proskuryakov <[email protected]>
[Mac] Move DefaultFonts.plist to C++ code
Modified: trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp (118798 => 118799)
--- trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp 2012-05-29 16:52:42 UTC (rev 118798)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp 2012-05-29 16:57:19 UTC (rev 118799)
@@ -208,6 +208,13 @@
m_response.setHTTPStatusCode(status);
m_response.setHTTPStatusText(message);
+
+ if (!isError(m_extendedStatusCode))
+ storeCredentials();
+ else if (isUnauthorized(m_extendedStatusCode)) {
+ purgeCredentials();
+ BlackBerry::Platform::log(BlackBerry::Platform::LogLevelCritical, "Authentication failed, purge the stored credentials for this site.");
+ }
}
void NetworkJob::notifyHeadersReceived(BlackBerry::Platform::NetworkRequest::HeaderList& headers)
@@ -441,14 +448,6 @@
notifyStatusReceived(BlackBerry::Platform::FilterStream::StatusNetworkError, 0);
}
- // If an HTTP authentication-enabled request is successful, save
- // the credentials for later reuse. If the request fails, delete
- // the saved credentials.
- if (!isError(m_extendedStatusCode))
- storeCredentials();
- else if (isUnauthorized(m_extendedStatusCode))
- purgeCredentials();
-
if (shouldReleaseClientResource()) {
if (isRedirect(m_extendedStatusCode) && (m_redirectCount >= s_redirectMaximum))
m_extendedStatusCode = BlackBerry::Platform::FilterStream::StatusTooManyRedirects;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes