support secure connection on fakes3
This commit is contained in:
parent
eaa0ce0ceb
commit
f0db5c0cd0
1 changed files with 2 additions and 2 deletions
|
@ -249,7 +249,7 @@ def get_download_url(module, s3, bucket, obj, expiry, changed=True):
|
||||||
def is_fakes3(s3_url):
|
def is_fakes3(s3_url):
|
||||||
""" Return True if s3_url has scheme fakes3:// """
|
""" Return True if s3_url has scheme fakes3:// """
|
||||||
if s3_url is not None:
|
if s3_url is not None:
|
||||||
return urlparse.urlparse(s3_url).scheme == 'fakes3'
|
return urlparse.urlparse(s3_url).scheme in ('fakes3', 'fakes3s')
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ def main():
|
||||||
if is_fakes3(s3_url):
|
if is_fakes3(s3_url):
|
||||||
fakes3 = urlparse.urlparse(s3_url)
|
fakes3 = urlparse.urlparse(s3_url)
|
||||||
s3 = S3Connection(
|
s3 = S3Connection(
|
||||||
is_secure=False,
|
is_secure=fakes3.scheme == 'fakes3s',
|
||||||
host=fakes3.hostname,
|
host=fakes3.hostname,
|
||||||
port=fakes3.port,
|
port=fakes3.port,
|
||||||
calling_format=OrdinaryCallingFormat(),
|
calling_format=OrdinaryCallingFormat(),
|
||||||
|
|
Loading…
Reference in a new issue