@@ -908,8 +908,8 @@ - (void)request_CloseShareHash:(NSString *)hashStr andBlock:(void (^)(id data, N
908908
909909#pragma mark Code
910910- (void )request_CodeTree : (CodeTree *)codeTree withPro : (Project *)project codeTreeBlock : (void (^)(id codeTreeData, NSError *codeTreeError))block {
911- NSString *treePath = [NSString stringWithFormat: @" api/user/%@ /project/%@ /git/tree/%@ /%@ " , project.owner_user_name, project.name, codeTree.ref, codeTree.path];
912- NSString *treeinfoPath = [NSString stringWithFormat: @" api/user/%@ /project/%@ /git/treeinfo/%@ /%@ " , project.owner_user_name, project.name, codeTree.ref, codeTree.path];
911+ NSString *treePath = [NSString stringWithFormat: @" api/user/%@ /project/%@ /git/tree/%@ /%@ " , project.owner_user_name, project.name, [ codeTree.ref URLEncoding_Coding ], [ codeTree.path URLEncoding_Coding ] ];
912+ NSString *treeinfoPath = [NSString stringWithFormat: @" api/user/%@ /project/%@ /git/treeinfo/%@ /%@ " , project.owner_user_name, project.name, [ codeTree.ref URLEncoding_Coding ], [ codeTree.path URLEncoding_Coding ] ];
913913 [[CodingNetAPIClient sharedJsonClient ] requestJsonDataWithPath: treePath withParams: nil withMethodType: Get andBlock: ^(id data, NSError *error) {
914914 if (data) {
915915 id resultData = [data valueForKeyPath: @" data" ];
@@ -936,7 +936,7 @@ - (void)request_CodeTree:(CodeTree *)codeTree withPro:(Project *)project codeTre
936936}
937937
938938- (void )request_CodeFile : (CodeFile *)codeFile withPro : (Project *)project andBlock : (void (^)(id data, NSError *error))block {
939- NSString *filePath = [NSString stringWithFormat: @" api/user/%@ /project/%@ /git/blob/%@ /%@ " , project.owner_user_name, project.name, codeFile.ref, codeFile.path];
939+ NSString *filePath = [NSString stringWithFormat: @" api/user/%@ /project/%@ /git/blob/%@ /%@ " , project.owner_user_name, project.name, [ codeFile.ref URLEncoding_Coding ], [ codeFile.path URLEncoding_Coding ] ];
940940 [[CodingNetAPIClient sharedJsonClient ] requestJsonDataWithPath: filePath withParams: nil withMethodType: Get andBlock: ^(id data, NSError *error) {
941941 if (data) {
942942 [MobClick event: kUmeng_Event_Request_Get label: @" 代码文件内容" ];
@@ -966,7 +966,7 @@ - (void)request_CodeBranchOrTagWithPath:(NSString *)path withPro:(Project *)proj
966966}
967967
968968- (void )request_Commits : (Commits *)curCommits withPro : (Project *)project andBlock : (void (^)(id data, NSError *error))block {
969- NSString *path = [NSString stringWithFormat: @" api/user/%@ /project/%@ /git/commits/%@ /%@ " , project.owner_user_name, project.name, curCommits.ref, curCommits.path];
969+ NSString *path = [NSString stringWithFormat: @" api/user/%@ /project/%@ /git/commits/%@ /%@ " , project.owner_user_name, project.name, [ curCommits.ref URLEncoding_Coding ], [ curCommits.path URLEncoding_Coding ] ];
970970 [[CodingNetAPIClient sharedJsonClient ] requestJsonDataWithPath: path withParams: [curCommits toParams ] withMethodType: Get andBlock: ^(id data, NSError *error) {
971971 if (data) {
972972 [MobClick event: kUmeng_Event_Request_Get label: @" 提交记录_列表" ];
0 commit comments