Skip to content

Commit 9df40c2

Browse files
committed
When processing the storage url, make sure the port is set to 80 if not defined in the url
1 parent 9b299b9 commit 9df40c2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

swift/auth/server.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,11 @@ def add_storage_account(self, account_name=''):
197197
(?, ?, '.super_admin', '.single_use', '.reseller_admin')''',
198198
(token, time()))
199199
conn.commit()
200-
conn = http_connect(parsed.hostname, parsed.port, 'PUT', parsed.path,
200+
if parsed.port is None:
201+
port = 80
202+
else:
203+
port = parsed.port
204+
conn = http_connect(parsed.hostname, port, 'PUT', parsed.path,
201205
{'X-Auth-Token': token}, ssl=(parsed.scheme == 'https'))
202206
resp = conn.getresponse()
203207
resp.read()

0 commit comments

Comments
 (0)