Skip to content

Commit

Permalink
Log responses received as part of an authentication challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeabdullah committed Oct 11, 2013
1 parent dc485b0 commit d9316bd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Sources/Core/DAVRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ - (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectio

- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
{
// Log the challenge's response object
NSHTTPURLResponse *response = (NSHTTPURLResponse *)challenge.failureResponse;
if ([response isKindOfClass:[NSHTTPURLResponse class]])
{
NSInteger code = response.statusCode;
[[self session] appendFormatToReceivedTranscript:@"%i %@", code, [[response class] localizedStringForStatusCode:code]];
}


id <DAVSessionDelegate> delegate = [self.session valueForKey:@"delegate"];
if ([delegate respondsToSelector:@selector(webDAVSession:didReceiveAuthenticationChallenge:)])
{
Expand Down

0 comments on commit d9316bd

Please sign in to comment.