[Issue #559] Fixed body for NSNull parameter values in multipart/form-data requests
Parts for parameters with a value of NSNull now have an empty body rather than "<null>" (which was produced by -[NSNull description]).
This commit is contained in:
parent
79f743c319
commit
d8f074dcfa
1 changed files with 2 additions and 0 deletions
|
|
@ -473,6 +473,8 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {}
|
||||||
NSData *data = nil;
|
NSData *data = nil;
|
||||||
if ([pair.value isKindOfClass:[NSData class]]) {
|
if ([pair.value isKindOfClass:[NSData class]]) {
|
||||||
data = pair.value;
|
data = pair.value;
|
||||||
|
} else if ([pair.value isKindOfClass:[NSNull class]]) {
|
||||||
|
data = [NSData data];
|
||||||
} else {
|
} else {
|
||||||
data = [[pair.value description] dataUsingEncoding:self.stringEncoding];
|
data = [[pair.value description] dataUsingEncoding:self.stringEncoding];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue