From 9df40c2ee8b4218d78d26352d72b995042bc048a Mon Sep 17 00:00:00 2001 From: Chuck Thier Date: Tue, 19 Oct 2010 22:22:11 +0000 Subject: [PATCH] When processing the storage url, make sure the port is set to 80 if not defined in the url --- swift/auth/server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/swift/auth/server.py b/swift/auth/server.py index 24acda6196..780975b759 100644 --- a/swift/auth/server.py +++ b/swift/auth/server.py @@ -197,7 +197,11 @@ YOU HAVE A FEW OPTIONS: (?, ?, '.super_admin', '.single_use', '.reseller_admin')''', (token, time())) conn.commit() - conn = http_connect(parsed.hostname, parsed.port, 'PUT', parsed.path, + if parsed.port is None: + port = 80 + else: + port = parsed.port + conn = http_connect(parsed.hostname, port, 'PUT', parsed.path, {'X-Auth-Token': token}, ssl=(parsed.scheme == 'https')) resp = conn.getresponse() resp.read()