Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions QiniuSDK/Http/QNHttpResponseInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ - (instancetype)initWithResponseInfoHost:(NSString *)host
_errorType = parse_error;
} else if (error.code == -999) {
_errorType = user_canceled;
} else if (error.code == 100) {
_errorType = protocol_error;
} else {
_errorType = unknown_error;
}
Expand Down
1 change: 1 addition & 0 deletions QiniuSDK/Storage/QNUploadInfoCollector.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ extern NSString *const parse_error; // 解析响应错误
extern NSString *const malicious_response; // 用户劫持错误
extern NSString *const user_canceled; // 用户主动取消
extern NSString *const bad_request; // API 失败是由于客户端的参数错误导致,⽆法依靠重试来解决的(例如 4xx 错误, upload token 错误,⽬标 bucket 不存在,⽂件已经存在,区域不正确,额度不够 等)
extern NSString *const protocol_error; // 协议错误

extern int64_t QN_IntNotSet;

Expand Down
1 change: 1 addition & 0 deletions QiniuSDK/Storage/QNUploadInfoCollector.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
NSString *const malicious_response = @"malicious_response";
NSString *const user_canceled = @"user_canceled";
NSString *const bad_request = @"bad_request";
NSString *const protocol_error = @"protocol_error";

static NSString *const requestTypes[] = {@"form", @"mkblk", @"bput", @"mkfile", @"put", @"init_parts", @"upload_part", @"complete_part", @"uc_query", @"httpdns_query"};

Expand Down
2 changes: 1 addition & 1 deletion QiniuSDKTests/QNTestConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
// Copyright (c) 2014年 Qiniu. All rights reserved.
//

static NSString *const g_token = @"bjtWBQXrcxgo7HWwlC_bgHg81j352_GhgBGZPeOW:D0XrIxOVDM8ARHvGcI9-fZqg4Pc=:eyJzY29wZSI6InNodWFuZ2h1bzEiLCJkZWFkbGluZSI6MTU5MDA1NzM3NH0K";
static NSString *const g_token = @"bjtWBQXrcxgo7HWwlC_bgHg81j352_GhgBGZPeOW:1EBiuzptfR1Akw5B4QwxJRYYelg=:eyJzY29wZSI6InNodWFuZ2h1bzEiLCJkZWFkbGluZSI6MTU5MDgwODA1MX0K";