Fix parsing virtual hosted S3 URI

This commit is contained in:
Dani Pozo 2023-12-07 12:32:32 +01:00
parent b3f22449f6
commit 7ac4e83acc

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