mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-06 09:41:09 +08:00
Added specs for zero-length Content-Length header when params is nil or empty
This commit is contained in:
@@ -178,7 +178,9 @@
|
||||
if ([_params respondsToSelector:@selector(HTTPHeaderValueForContentLength)]) {
|
||||
[_URLRequest setValue:[NSString stringWithFormat:@"%d", [_params HTTPHeaderValueForContentLength]] forHTTPHeaderField:@"Content-Length"];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
[_URLRequest setValue:@"0" forHTTPHeaderField:@"Content-Length"];
|
||||
}
|
||||
|
||||
// Add authentication headers so we don't have to deal with an extra cycle for each message requiring basic auth.
|
||||
if (self.forceBasicAuthentication) {
|
||||
|
||||
Reference in New Issue
Block a user