Fixed for backblaze b2 not working
This commit is contained in:
parent
f536681e9a
commit
2649d1f034
@ -38,7 +38,7 @@ BUCKET_URL=$ARCH_S3_BUCKET_URL
|
|||||||
|
|
||||||
_DATE=$( date -u +"%Y%m%d" )
|
_DATE=$( date -u +"%Y%m%d" )
|
||||||
_DTIME=$( date -u +"%Y%m%dT%H%M%SZ" )
|
_DTIME=$( date -u +"%Y%m%dT%H%M%SZ" )
|
||||||
_HEADERS="host;x-amz-date"
|
_HEADERS="host;x-amz-content-sha256;x-amz-date"
|
||||||
_SHA=$( echo -n "" | sha256sum | cut -d' ' -f1 )
|
_SHA=$( echo -n "" | sha256sum | cut -d' ' -f1 )
|
||||||
|
|
||||||
# Canon Request
|
# Canon Request
|
||||||
@ -46,6 +46,7 @@ _C="DELETE"
|
|||||||
_C="$_C\n/$_PATH"
|
_C="$_C\n/$_PATH"
|
||||||
_C="$_C\n" # no query strings here
|
_C="$_C\n" # no query strings here
|
||||||
_C="$_C\nhost:$BUCKET_URL"
|
_C="$_C\nhost:$BUCKET_URL"
|
||||||
|
_C="$_C\nx-amz-content-sha256:$_SHA"
|
||||||
_C="$_C\nx-amz-date:$_DTIME"
|
_C="$_C\nx-amz-date:$_DTIME"
|
||||||
_C="$_C\n"
|
_C="$_C\n"
|
||||||
_C="$_C\n$_HEADERS"
|
_C="$_C\n$_HEADERS"
|
||||||
|
@ -37,7 +37,7 @@ BUCKET_URL=$ARCH_S3_BUCKET_URL
|
|||||||
|
|
||||||
_DATE=$( date -u +"%Y%m%d" )
|
_DATE=$( date -u +"%Y%m%d" )
|
||||||
_DTIME=$( date -u +"%Y%m%dT%H%M%SZ" )
|
_DTIME=$( date -u +"%Y%m%dT%H%M%SZ" )
|
||||||
_HEADERS="host;x-amz-date"
|
_HEADERS="host;x-amz-content-sha256;x-amz-date"
|
||||||
_SHA=$( echo -n "" | sha256sum | cut -d' ' -f1 )
|
_SHA=$( echo -n "" | sha256sum | cut -d' ' -f1 )
|
||||||
|
|
||||||
# Canon Request
|
# Canon Request
|
||||||
@ -45,6 +45,7 @@ _C="GET"
|
|||||||
_C="$_C\n/$_PATH"
|
_C="$_C\n/$_PATH"
|
||||||
_C="$_C\n" # no query strings here
|
_C="$_C\n" # no query strings here
|
||||||
_C="$_C\nhost:$BUCKET_URL"
|
_C="$_C\nhost:$BUCKET_URL"
|
||||||
|
_C="$_C\nx-amz-content-sha256:$_SHA"
|
||||||
_C="$_C\nx-amz-date:$_DTIME"
|
_C="$_C\nx-amz-date:$_DTIME"
|
||||||
_C="$_C\n"
|
_C="$_C\n"
|
||||||
_C="$_C\n$_HEADERS"
|
_C="$_C\n$_HEADERS"
|
||||||
|
@ -37,7 +37,7 @@ BUCKET_URL=$ARCH_S3_BUCKET_URL
|
|||||||
|
|
||||||
_DATE=$( date -u +"%Y%m%d" )
|
_DATE=$( date -u +"%Y%m%d" )
|
||||||
_DTIME=$( date -u +"%Y%m%dT%H%M%SZ" )
|
_DTIME=$( date -u +"%Y%m%dT%H%M%SZ" )
|
||||||
_HEADERS="host;x-amz-date"
|
_HEADERS="host;x-amz-content-sha256;x-amz-date"
|
||||||
_SHA=$( echo -n "" | sha256sum | cut -d' ' -f1 )
|
_SHA=$( echo -n "" | sha256sum | cut -d' ' -f1 )
|
||||||
|
|
||||||
# Keys should be sorted
|
# Keys should be sorted
|
||||||
@ -68,6 +68,7 @@ _C="GET"
|
|||||||
_C="$_C\n/$_PATH"
|
_C="$_C\n/$_PATH"
|
||||||
_C="$_C\n$QSTR"
|
_C="$_C\n$QSTR"
|
||||||
_C="$_C\nhost:$BUCKET_URL"
|
_C="$_C\nhost:$BUCKET_URL"
|
||||||
|
_C="$_C\nx-amz-content-sha256:$_SHA"
|
||||||
_C="$_C\nx-amz-date:$_DTIME"
|
_C="$_C\nx-amz-date:$_DTIME"
|
||||||
_C="$_C\n"
|
_C="$_C\n"
|
||||||
_C="$_C\n$_HEADERS"
|
_C="$_C\n$_HEADERS"
|
||||||
|
@ -34,7 +34,7 @@ BUCKET_URL=$ARCH_S3_BUCKET_URL
|
|||||||
|
|
||||||
_DATE=$( date -u +"%Y%m%d" )
|
_DATE=$( date -u +"%Y%m%d" )
|
||||||
_DTIME=$( date -u +"%Y%m%dT%H%M%SZ" )
|
_DTIME=$( date -u +"%Y%m%dT%H%M%SZ" )
|
||||||
_HEADERS="host;x-amz-date"
|
_HEADERS="host;x-amz-content-sha256;x-amz-date"
|
||||||
_SHA=$( echo -n "" | sha256sum | cut -d' ' -f1 )
|
_SHA=$( echo -n "" | sha256sum | cut -d' ' -f1 )
|
||||||
_PATH=""
|
_PATH=""
|
||||||
|
|
||||||
@ -78,6 +78,7 @@ _C="GET"
|
|||||||
_C="$_C\n/$_PATH"
|
_C="$_C\n/$_PATH"
|
||||||
_C="$_C\n$QSTR"
|
_C="$_C\n$QSTR"
|
||||||
_C="$_C\nhost:$BUCKET_URL"
|
_C="$_C\nhost:$BUCKET_URL"
|
||||||
|
_C="$_C\nx-amz-content-sha256:$_SHA"
|
||||||
_C="$_C\nx-amz-date:$_DTIME"
|
_C="$_C\nx-amz-date:$_DTIME"
|
||||||
_C="$_C\n"
|
_C="$_C\n"
|
||||||
_C="$_C\n$_HEADERS"
|
_C="$_C\n$_HEADERS"
|
||||||
|
Loading…
Reference in New Issue
Block a user