Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Sources/NetShears/URLProtocol/NetworkLoggerUrlProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ extension NetworkLoggerUrlProtocol: URLSessionDataDelegate {
func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
let protectionSpace = challenge.protectionSpace
let sender = challenge.sender

if protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust {
if let serverTrust = protectionSpace.serverTrust {
let credential = URLCredential(trust: serverTrust)
Expand All @@ -133,6 +133,9 @@ extension NetworkLoggerUrlProtocol: URLSessionDataDelegate {
return
}
}

sender?.performDefaultHandling?(for: challenge)
completionHandler(.performDefaultHandling, nil)
}

func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) {
Expand Down