[Issue #1025] Removing redundant check for nonzero responseData length
Signed-off-by: Mattt Thompson <m@mattt.me>
This commit is contained in:
parent
17d267ba07
commit
4a43277fba
1 changed files with 1 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ static dispatch_queue_t json_request_operation_processing_queue() {
|
||||||
|
|
||||||
// Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization.
|
// Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization.
|
||||||
// See https://github.com/rails/rails/issues/1742
|
// See https://github.com/rails/rails/issues/1742
|
||||||
if ([self.responseData length] > 0 && self.responseString && ![self.responseString isEqualToString:@" "]) {
|
if (self.responseString && ![self.responseString isEqualToString:@" "]) {
|
||||||
// Workaround for a bug in NSJSONSerialization when Unicode character escape codes are used instead of the actual character
|
// Workaround for a bug in NSJSONSerialization when Unicode character escape codes are used instead of the actual character
|
||||||
// See http://stackoverflow.com/a/12843465/157142
|
// See http://stackoverflow.com/a/12843465/157142
|
||||||
NSData *data = [self.responseString dataUsingEncoding:NSUTF8StringEncoding];
|
NSData *data = [self.responseString dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue