From 91b0104fd0e05db88048f6d00c33aef41562938b Mon Sep 17 00:00:00 2001 From: seobyeongky Date: Fri, 27 Feb 2015 21:31:33 +0900 Subject: [PATCH] Fix an issue with iOS HTTP Request code (https://github.com/cocos2d/cocos2d-x/pull/10543) --- cocos/network/HttpAsynConnection.m | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cocos/network/HttpAsynConnection.m b/cocos/network/HttpAsynConnection.m index 8058485cc0..a3a62499af 100755 --- a/cocos/network/HttpAsynConnection.m +++ b/cocos/network/HttpAsynConnection.m @@ -87,13 +87,12 @@ | “205” ; Reset Content | “206” ; Partial Content */ - // if (responseCode < 200 || responseCode >= 300) - // {// something went wrong, abort the whole thing - - // [connection cancel]; - // finish = true; - // return; - // } + if (responseCode < 200 || responseCode >= 300) + {// something went wrong, abort the whole thing + self.responseError = [NSError errorWithDomain:@"CCBackendDomain" + code:responseCode + userInfo:@{NSLocalizedDescriptionKey: @"Bad HTTP Response Code"}]; + } [responseData setLength:0]; }