From e3615ec5f2024399fe374371ce19c62476d99041 Mon Sep 17 00:00:00 2001 From: masakih Date: Sat, 9 Aug 2014 18:14:05 +0900 Subject: [PATCH] =?utf8?q?=E3=82=A2=E3=83=AB=E3=82=B3=E3=82=99=E3=83=AA?= =?utf8?q?=E3=82=B9=E3=82=99=E3=83=A0=E8=A6=8B=E7=9B=B4=E3=81=97=20close?= =?utf8?q?=20#50314?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- KCD/HMJSONReciever.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/KCD/HMJSONReciever.m b/KCD/HMJSONReciever.m index 7929ad7e..8cc09d51 100644 --- a/KCD/HMJSONReciever.m +++ b/KCD/HMJSONReciever.m @@ -48,11 +48,9 @@ { NSURL *url = protocol.request.URL; NSString *path = url.path; - while(![path isEqualToString:@"/"]) { - if([path hasSuffix:@"kcsapi"]) { - [self setProtocol:protocol]; - } - path = [path stringByDeletingLastPathComponent]; + NSArray *pathComponents = [path pathComponents]; + if([pathComponents containsObject:@"kcsapi"]) { + [self setProtocol:protocol]; } } -- 2.11.0