Modified: trunk/Source/WebCore/ChangeLog (145580 => 145581)
--- trunk/Source/WebCore/ChangeLog 2013-03-12 21:05:37 UTC (rev 145580)
+++ trunk/Source/WebCore/ChangeLog 2013-03-12 21:10:45 UTC (rev 145581)
@@ -1,3 +1,20 @@
+2013-03-12 Alexey Proskuryakov <a...@apple.com>
+
+ Improve logging in ResourceHandleMac.mm
+ https://bugs.webkit.org/show_bug.cgi?id=112185
+
+ Reviewed by Brady Eidson.
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Removed an obsolete #if.
+ (WebCore::ResourceHandle::receivedCredential):
+ (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
+ (WebCore::ResourceHandle::receivedCancellation):
+ (-[WebCoreResourceHandleAsDelegate connection:didCancelAuthenticationChallenge:]): Added a FIXME.
+ (-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]):
+
+ * platform/network/mac/ResourceResponseMac.mm: Removed an unneeded include.
+
2013-03-12 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r145554.
Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (145580 => 145581)
--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm 2013-03-12 21:05:37 UTC (rev 145580)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm 2013-03-12 21:10:45 UTC (rev 145581)
@@ -454,7 +454,6 @@
// we make sure that is actually present
ASSERT(challenge.nsURLAuthenticationChallenge());
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
// Proxy authentication is handled by CFNetwork internally. We can get here if the user cancels
// CFNetwork authentication dialog, and we shouldn't ask the client to display another one in that case.
if (challenge.protectionSpace().isProxy()) {
@@ -462,7 +461,6 @@
[challenge.sender() continueWithoutCredentialForAuthenticationChallenge:challenge.nsURLAuthenticationChallenge()];
return;
}
-#endif
if (!d->m_user.isNull() && !d->m_pass.isNull()) {
NSURLCredential *credential = [[NSURLCredential alloc] initWithUser:d->m_user
@@ -533,6 +531,8 @@
void ResourceHandle::receivedCredential(const AuthenticationChallenge& challenge, const Credential& credential)
{
+ LOG(Network, "Handle %p receivedCredential", this);
+
ASSERT(!challenge.isNull());
if (challenge != d->m_currentWebChallenge)
return;
@@ -561,6 +561,8 @@
void ResourceHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& challenge)
{
+ LOG(Network, "Handle %p receivedRequestToContinueWithoutCredential", this);
+
ASSERT(!challenge.isNull());
if (challenge != d->m_currentWebChallenge)
return;
@@ -572,6 +574,8 @@
void ResourceHandle::receivedCancellation(const AuthenticationChallenge& challenge)
{
+ LOG(Network, "Handle %p receivedCancellation", this);
+
if (challenge != d->m_currentWebChallenge)
return;
@@ -674,6 +678,8 @@
- (void)connection:(NSURLConnection *)connection didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
{
+ // FIXME: We probably don't need to implement this (see <rdar://problem/8960124>).
+
UNUSED_PARAM(connection);
LOG(Network, "Handle %p delegate connection:%p didCancelAuthenticationChallenge:%p", m_handle, connection, challenge);
@@ -686,11 +692,9 @@
#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace
{
-#if LOG_DISABLED
UNUSED_PARAM(connection);
-#endif
- LOG(Network, "Handle %p delegate connection:%p canAuthenticateAgainstProtectionSpace:%p", m_handle, connection, protectionSpace);
+ LOG(Network, "Handle %p delegate connection:%p canAuthenticateAgainstProtectionSpace:%@://%@:%u realm:%@ method:%@ %@%@", m_handle, connection, [protectionSpace protocol], [protectionSpace host], [protectionSpace port], [protectionSpace realm], [protectionSpace authenticationMethod], [protectionSpace isProxy] ? @"proxy:" : @"", [protectionSpace isProxy] ? [protectionSpace proxyType] : @"");
if (!m_handle)
return NO;
Modified: trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm (145580 => 145581)
--- trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm 2013-03-12 21:05:37 UTC (rev 145580)
+++ trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm 2013-03-12 21:10:45 UTC (rev 145581)
@@ -30,9 +30,8 @@
#import "WebCoreURLResponse.h"
#import "WebCoreSystemInterface.h"
#import <Foundation/Foundation.h>
-#import <wtf/StdLibExtras.h>
#import <limits>
-#include <wtf/text/CString.h>
+#import <wtf/StdLibExtras.h>
using namespace std;