mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-04 20:07:54 +00:00
switch to use region specific endpoints to compute correct v4 signature
fix #133
This commit is contained in:
parent
07e007052a
commit
70097709b2
@ -3102,6 +3102,13 @@ static int s3fs_check_service(void)
|
||||
LOWSYSLOGPRINT(LOG_ERR, "Could not connect wrong region %s, so retry to connect region %s.", endpoint.c_str(), expectregion.c_str());
|
||||
FPRN("Could not connect wrong region %s, so retry to connect region %s.", endpoint.c_str(), expectregion.c_str());
|
||||
endpoint = expectregion;
|
||||
if (S3fsCurl::IsSignatureV4()) {
|
||||
if (host == "http://s3.amazonaws.com") {
|
||||
host = "http://s3-" + endpoint + ".amazonaws.com";
|
||||
} else if (host == "https://s3.amazonaws.com") {
|
||||
host = "https://s3-" + endpoint + ".amazonaws.com";
|
||||
}
|
||||
}
|
||||
|
||||
// retry to check
|
||||
s3fscurl.DestroyCurlHandle();
|
||||
|
Loading…
Reference in New Issue
Block a user