diff --git a/AFNetworking/AFURLConnectionOperation.m b/AFNetworking/AFURLConnectionOperation.m index d95be67..2dfc525 100644 --- a/AFNetworking/AFURLConnectionOperation.m +++ b/AFNetworking/AFURLConnectionOperation.m @@ -573,6 +573,16 @@ didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge } } +- (NSInputStream *)connection:(NSURLConnection *)connection + needNewBodyStream:(NSURLRequest *)request +{ + if ([request.HTTPBodyStream conformsToProtocol:@protocol(NSCopying)]) { + return [request.HTTPBodyStream copy]; + } + + return nil; +} + - (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse @@ -657,16 +667,6 @@ didReceiveResponse:(NSURLResponse *)response } } -- (NSInputStream *)connection:(NSURLConnection *)connection - needNewBodyStream:(NSURLRequest *)request -{ - if ([request.HTTPBodyStream conformsToProtocol:@protocol(NSCopying)]) { - return [request.HTTPBodyStream copy]; - } - - return nil; -} - #pragma mark - NSCoding - (id)initWithCoder:(NSCoder *)aDecoder {