Skip to content

Commit

Permalink
Merge pull request Alamofire#469 from subicura/master
Browse files Browse the repository at this point in the history
Allow nil when attempting to prevent redirection.
  • Loading branch information
cnoon committed May 4, 2015
2 parents 83774b0 + 3681fd1 commit e9757cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Alamofire.swift
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ public class Manager {
public var taskDidComplete: ((NSURLSession, NSURLSessionTask, NSError?) -> Void)?

public func URLSession(session: NSURLSession, task: NSURLSessionTask, willPerformHTTPRedirection response: NSHTTPURLResponse, newRequest request: NSURLRequest, completionHandler: ((NSURLRequest!) -> Void)) {
var redirectRequest: NSURLRequest! = request
var redirectRequest: NSURLRequest? = request

if taskWillPerformHTTPRedirection != nil {
redirectRequest = taskWillPerformHTTPRedirection!(session, task, response, request)
Expand Down

0 comments on commit e9757cf

Please sign in to comment.