Don't add trailing slash to auth URL.

Adding a trailing slash to the authentication URL may interfere with
auth service implementations not using /FOO/ but /FOO as authentication
URL.

OpenStack Object Storage API 1.0 doesn't specify that the auth URL must
end in a slash and swiftclient.client doesn't force it either.

Change-Id: I4e6b6d758d5ccc884e253880513e3d8763ffc2ff
Fixes: bug #1085827
This commit is contained in:
Juan J. Martinez 2012-12-03 10:14:26 +00:00
parent 402d87c757
commit 994c691d66

@ -1030,10 +1030,6 @@ def parse_args(parser, args, enforce_requires=True):
'region_name': options.os_region_name,
}
# Handle trailing '/' in URL
if options.auth and not options.auth.endswith('/'):
options.auth += '/'
if enforce_requires and \
not (options.auth and options.user and options.key):
exit('''