Skip to content

Commit d7f9d38

Browse files
author
yongqingliu
committed
Merge branch 'v1.0.21' into 'v1.0.21' (merge request !4)
enable content md5 by default
2 parents 78e3ac6 + de98725 commit d7f9d38

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/curl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ storage_class_t S3fsCurl::storage_class = STANDARD;
294294
sseckeylist_t S3fsCurl::sseckeys;
295295
std::string S3fsCurl::ssekmsid = "";
296296
sse_type_t S3fsCurl::ssetype = SSE_DISABLE;
297-
bool S3fsCurl::is_content_md5 = false;
297+
bool S3fsCurl::is_content_md5 = true;
298298
bool S3fsCurl::is_verbose = false;
299299
string S3fsCurl::COSAccessKeyId;
300300
string S3fsCurl::COSSecretAccessKey;

src/s3fs.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4939,6 +4939,10 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar
49394939
S3fsCurl::SetContentMd5(true);
49404940
return 0;
49414941
}
4942+
if(0 == strcmp(arg, "disable_content_md5")){
4943+
S3fsCurl::SetContentMd5(false);
4944+
return 0;
4945+
}
49424946
if(0 == STR2NCMP(arg, "url=")){
49434947
host = strchr(arg, '=') + sizeof(char);
49444948
// strip the trailing '/', if any, off the end of the host

src/s3fs_util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,8 +1028,8 @@ void show_help (void)
10281028
"\n"
10291029
" nomultipart (disable multipart uploads)\n"
10301030
"\n"
1031-
" enable_content_md5 (default is disable)\n"
1032-
" - ensure data integrity during writes with MD5 hash.\n"
1031+
" disable_content_md5 (md5 default is enabled)\n"
1032+
" - content md5 will ensure data integrity during upload with MD5 hash.\n"
10331033
"\n"
10341034
"\n"
10351035
" nocopyapi (for other incomplete compatibility object storage)\n"

0 commit comments

Comments
 (0)