Merge pull request #57612 from danipozo/fix-reading-s3-script-backupview

Fix parsing virtual hosted S3 URI in clickhouse_backupview script
This commit is contained in:
robot-clickhouse 2023-12-08 10:17:12 +01:00 committed by GitHub
commit 2d134fd120
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1256,7 +1256,7 @@ class S3URI:
host = parsed_url.netloc
if host.find(".s3") == -1:
return False
self.bucket, new_host = path.split(".s3", maxsplit=1)
self.bucket, new_host = host.split(".s3", maxsplit=1)
if len(self.bucket) < 3:
return False
new_host = "s3" + new_host