diff --git a/AFNetworking/AFHTTPClient.m b/AFNetworking/AFHTTPClient.m index e2fd452..8f49be3 100644 --- a/AFNetworking/AFHTTPClient.m +++ b/AFNetworking/AFHTTPClient.m @@ -546,7 +546,7 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { - (void)cancelAllHTTPOperationsWithMethod:(NSString *)method path:(NSString *)path { - NSString *URLStringToMatched = [[[self requestWithMethod:(method ?: @"GET") path:path parameters:nil] URL] absoluteString]; + NSString *pathToBeMatched = [[[self requestWithMethod:(method ?: @"GET") path:path parameters:nil] URL] path]; for (NSOperation *operation in [self.operationQueue operations]) { if (![operation isKindOfClass:[AFHTTPRequestOperation class]]) { @@ -554,9 +554,9 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { } BOOL hasMatchingMethod = !method || [method isEqualToString:[[(AFHTTPRequestOperation *)operation request] HTTPMethod]]; - BOOL hasMatchingURL = [[[[(AFHTTPRequestOperation *)operation request] URL] absoluteString] isEqualToString:URLStringToMatched]; + BOOL hasMatchingPath = [[[[(AFHTTPRequestOperation *)operation request] URL] path] isEqual:pathToBeMatched]; - if (hasMatchingMethod && hasMatchingURL) { + if (hasMatchingMethod && hasMatchingPath) { [operation cancel]; } }