Merge branch 'master' of github.com:AFNetworking/AFNetworking
This commit is contained in:
commit
24dfebb424
3 changed files with 10 additions and 8 deletions
|
|
@ -116,9 +116,9 @@ static NSString * AFPercentEscapedQueryStringPairMemberFromStringWithEncoding(NS
|
||||||
|
|
||||||
- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding {
|
- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding {
|
||||||
if (!self.value || [self.value isEqual:[NSNull null]]) {
|
if (!self.value || [self.value isEqual:[NSNull null]]) {
|
||||||
return AFPercentEscapedQueryStringPairMemberFromStringWithEncoding(self.field, stringEncoding);
|
return AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([self.field description], stringEncoding);
|
||||||
} else {
|
} 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)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -520,8 +520,8 @@ didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)connection:(NSURLConnection *)__unused connection
|
- (void)connection:(NSURLConnection __unused *)connection
|
||||||
didSendBodyData:(NSInteger)bytesWritten
|
didSendBodyData:(NSInteger)bytesWritten
|
||||||
totalBytesWritten:(NSInteger)totalBytesWritten
|
totalBytesWritten:(NSInteger)totalBytesWritten
|
||||||
totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite
|
totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite
|
||||||
{
|
{
|
||||||
|
|
@ -532,7 +532,7 @@ totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)connection:(NSURLConnection *)__unused connection
|
- (void)connection:(NSURLConnection __unused *)connection
|
||||||
didReceiveResponse:(NSURLResponse *)response
|
didReceiveResponse:(NSURLResponse *)response
|
||||||
{
|
{
|
||||||
self.response = response;
|
self.response = response;
|
||||||
|
|
@ -540,7 +540,7 @@ didReceiveResponse:(NSURLResponse *)response
|
||||||
[self.outputStream open];
|
[self.outputStream open];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)connection:(NSURLConnection *)__unused connection
|
- (void)connection:(NSURLConnection __unused *)connection
|
||||||
didReceiveData:(NSData *)data
|
didReceiveData:(NSData *)data
|
||||||
{
|
{
|
||||||
self.totalBytesRead += [data length];
|
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.responseData = [self.outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey];
|
||||||
|
|
||||||
[self.outputStream close];
|
[self.outputStream close];
|
||||||
|
|
@ -567,7 +567,7 @@ didReceiveResponse:(NSURLResponse *)response
|
||||||
self.connection = nil;
|
self.connection = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)connection:(NSURLConnection *)__unused connection
|
- (void)connection:(NSURLConnection __unused *)connection
|
||||||
didFailWithError:(NSError *)error
|
didFailWithError:(NSError *)error
|
||||||
{
|
{
|
||||||
self.error = error;
|
self.error = error;
|
||||||
|
|
|
||||||
2
CHANGES
2
CHANGES
|
|
@ -1,5 +1,7 @@
|
||||||
= master
|
= master
|
||||||
|
|
||||||
|
* Moved __unused keywords for better Xcode indexing (Christian Rasmussen)
|
||||||
|
|
||||||
* Sorting dictionary keys with `caseInsensitiveCompare:` to ensure
|
* Sorting dictionary keys with `caseInsensitiveCompare:` to ensure
|
||||||
deterministic ordering of query string parameters, which may otherwise
|
deterministic ordering of query string parameters, which may otherwise
|
||||||
cause ambiguous representations of nested parameters (James Coleman,
|
cause ambiguous representations of nested parameters (James Coleman,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue