Skip to content

Commit

Permalink
Fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Dapeng Gao committed May 19, 2016
1 parent a7e2562 commit e184a22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Sources/ImageDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ public protocol AuthenticationChallengeResponable: class {

- Note: This method is a forward from `URLSession(:didReceiveChallenge:completionHandler:)`. Please refer to the document of it in `NSURLSessionDelegate`.
*/
func downloder(downloader: ImageDownloader, didReceiveChallenge challenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)
func downloader(downloader: ImageDownloader, didReceiveChallenge challenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)
}

extension AuthenticationChallengeResponable {

func downloder(downloader: ImageDownloader, didReceiveChallenge challenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) {
func downloader(downloader: ImageDownloader, didReceiveChallenge challenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) {

if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust {
if let trustedHosts = downloader.trustedHosts where trustedHosts.contains(challenge.protectionSpace.host) {
Expand Down Expand Up @@ -269,7 +269,7 @@ extension ImageDownloader {
progressBlock: ImageDownloaderProgressBlock?,
completionHandler: ImageDownloaderCompletionHandler?) -> RetrieveImageDownloadTask?
{
if let retrieveImageTask = retrieveImageTask where retrieveImageTask.cancelledBeforeDownlodStarting {
if let retrieveImageTask = retrieveImageTask where retrieveImageTask.cancelledBeforeDownloadStarting {
return nil
}

Expand Down Expand Up @@ -411,7 +411,7 @@ class ImageDownloaderSessionHandler: NSObject, NSURLSessionDataDelegate, Authent
return
}

downloader.authenticationChallengeResponder?.downloder(downloader, didReceiveChallenge: challenge, completionHandler: completionHandler)
downloader.authenticationChallengeResponder?.downloader(downloader, didReceiveChallenge: challenge, completionHandler: completionHandler)
}

private func callbackWithImage(image: Image?, error: NSError?, imageURL: NSURL, originalData: NSData?) {
Expand Down
4 changes: 2 additions & 2 deletions Sources/KingfisherManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class RetrieveImageTask {

// If task is canceled before the download task started (which means the `downloadTask` is nil),
// the download task should not begin.
var cancelledBeforeDownlodStarting: Bool = false
var cancelledBeforeDownloadStarting: Bool = false

/// The disk retrieve task in this image task. Kingfisher will try to look up in cache first. This task represent the cache search task.
public var diskRetrieveTask: RetrieveImageDiskTask?
Expand All @@ -61,7 +61,7 @@ public class RetrieveImageTask {
if let downloadTask = downloadTask {
downloadTask.cancel()
} else {
cancelledBeforeDownlodStarting = true
cancelledBeforeDownloadStarting = true
}
}
}
Expand Down

0 comments on commit e184a22

Please sign in to comment.