diff --git a/AFNetworking/AFHTTPClient.m b/AFNetworking/AFHTTPClient.m index 51c3be8..67bdb33 100644 --- a/AFNetworking/AFHTTPClient.m +++ b/AFNetworking/AFHTTPClient.m @@ -116,9 +116,9 @@ static NSString * AFPercentEscapedQueryStringPairMemberFromStringWithEncoding(NS - (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding { if (!self.value || [self.value isEqual:[NSNull null]]) { - return AFPercentEscapedQueryStringPairMemberFromStringWithEncoding(self.field, stringEncoding); + return AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([self.field description], stringEncoding); } else { - return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedQueryStringPairMemberFromStringWithEncoding(self.field, stringEncoding), AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([self.value description], stringEncoding)]; + return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([self.field description], stringEncoding), AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([self.value description], stringEncoding)]; } } diff --git a/AFNetworking/AFURLConnectionOperation.m b/AFNetworking/AFURLConnectionOperation.m index 0c16464..cf9741c 100644 --- a/AFNetworking/AFURLConnectionOperation.m +++ b/AFNetworking/AFURLConnectionOperation.m @@ -520,8 +520,8 @@ didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge } } -- (void)connection:(NSURLConnection *)__unused connection - didSendBodyData:(NSInteger)bytesWritten +- (void)connection:(NSURLConnection __unused *)connection + didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite { @@ -532,7 +532,7 @@ totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite } } -- (void)connection:(NSURLConnection *)__unused connection +- (void)connection:(NSURLConnection __unused *)connection didReceiveResponse:(NSURLResponse *)response { self.response = response; @@ -540,7 +540,7 @@ didReceiveResponse:(NSURLResponse *)response [self.outputStream open]; } -- (void)connection:(NSURLConnection *)__unused connection +- (void)connection:(NSURLConnection __unused *)connection didReceiveData:(NSData *)data { self.totalBytesRead += [data length]; @@ -557,7 +557,7 @@ didReceiveResponse:(NSURLResponse *)response } } -- (void)connectionDidFinishLoading:(NSURLConnection *)__unused connection { +- (void)connectionDidFinishLoading:(NSURLConnection __unused *)connection { self.responseData = [self.outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey]; [self.outputStream close]; @@ -567,7 +567,7 @@ didReceiveResponse:(NSURLResponse *)response self.connection = nil; } -- (void)connection:(NSURLConnection *)__unused connection +- (void)connection:(NSURLConnection __unused *)connection didFailWithError:(NSError *)error { self.error = error; diff --git a/CHANGES b/CHANGES index 543ddcc..f1895ad 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ = master + * Moved __unused keywords for better Xcode indexing (Christian Rasmussen) + * Sorting dictionary keys with `caseInsensitiveCompare:` to ensure deterministic ordering of query string parameters, which may otherwise cause ambiguous representations of nested parameters (James Coleman,