Parcourir la source

Allow return value of HTTP redirection block to be NULL (#3975)

* Allow return value of HTTP redirection block to be NULL

* Make tests pass again (#3993)

* Make tests pass again

* Fix macOS builds in Fastlane.
Dominik Gruber il y a 8 ans
Parent
commit
dd59ffa188
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      AFNetworking/AFURLSessionManager.h

+ 1 - 1
AFNetworking/AFURLSessionManager.h

@@ -354,7 +354,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 
  @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response.
  @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response.
  */
  */
-- (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block;
+- (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * _Nullable (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block;
 
 
 /**
 /**
  Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`.
  Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`.