Skip to content

Commit

Permalink
Unwrap optionals for basic auth credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
johngibb committed Oct 15, 2014
1 parent 95b66e7 commit 9430470
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Alamofire.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1224,11 +1224,11 @@ extension Request: DebugPrintable {
let protectionSpace = NSURLProtectionSpace(host: URL.host!, port: URL.port ?? 0, `protocol`: URL.scheme, realm: URL.host, authenticationMethod: NSURLAuthenticationMethodHTTPBasic)
if let credentials = credentialStorage.credentialsForProtectionSpace(protectionSpace)?.values.array {
for credential: NSURLCredential in (credentials as [NSURLCredential]) {
components.append("-u \(credential.user):\(credential.password)")
components.append("-u \(credential.user!):\(credential.password!)")
}
} else {
if let credential = delegate.credential {
components.append("-u \(credential.user):\(credential.password)")
components.append("-u \(credential.user!):\(credential.password!)")
}
}
}
Expand Down

0 comments on commit 9430470

Please sign in to comment.