Skip to content

Commit

Permalink
Merge branch 'fix_huberyxxiao' into 'master' (merge request !6)
Browse files Browse the repository at this point in the history
fix_huberyxxiao
  • Loading branch information
huberyxxiao committed Apr 12, 2024
2 parents 53de346 + 08fb0cf commit 66b0e65
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ modules.order
Module.symvers
Mkfile.old
dkms.conf
build/*
12 changes: 12 additions & 0 deletions cos_c_sdk/cos_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ cos_status_t *cos_head_object(const cos_request_options_t *options,

s = cos_process_request(options, req, resp, 1);
cos_fill_read_response_header(resp, resp_headers);
if(s != NULL && s->code == 404)
{
s->error_code = "NosuchKey";
}

return s;
}
Expand Down Expand Up @@ -982,6 +986,10 @@ int cos_gen_presigned_url(const cos_request_options_t *options,
http_method_e method,
cos_string_t *presigned_url)
{
if (object == NULL || object->len == 0){
cos_str_set(presigned_url, "ObjectName does not support empty, please check!");
return COSE_UNKNOWN_ERROR;
}
cos_string_t signstr;
int res;
cos_http_request_t *req = NULL;
Expand Down Expand Up @@ -1055,6 +1063,10 @@ int cos_gen_presigned_url_safe(const cos_request_options_t *options,
int sign_host,
cos_string_t *presigned_url)
{
if (object == NULL || object->len == 0){
cos_str_set(presigned_url, "ObjectName does not support empty, please check!");
return COSE_UNKNOWN_ERROR;
}
cos_string_t signstr;
int res;
cos_http_request_t *req = NULL;
Expand Down
2 changes: 1 addition & 1 deletion cos_c_sdk/cos_sys_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ typedef apr_array_header_t cos_array_header_t;
#define CR (char) 13
#define CRLF "\x0d\x0a"

#define COS_VERSION "5.0.16"
#define COS_VERSION "5.0.17"
#define COS_VER "cos-sdk-c/" COS_VERSION

#define COS_HTTP_PREFIX "http://"
Expand Down
2 changes: 1 addition & 1 deletion cos_c_sdk/cos_sys_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static const char *g_s_mon[] = {
};

static const char g_s_gmt_format[] = "%s, %.2d %s %.4d %.2d:%.2d:%.2d GMT";
static int retry_change_domin_config = 1;
static int retry_change_domin_config = COS_FALSE;

static cos_table_t *g_sign_header_table = NULL;
static cos_pool_t *g_table_pool = NULL;
Expand Down

0 comments on commit 66b0e65

Please sign in to comment.