diff --git a/bin/swift-temp-url b/bin/swift-temp-url index 34445e8be8..09b042fede 100755 --- a/bin/swift-temp-url +++ b/bin/swift-temp-url @@ -40,13 +40,13 @@ if __name__ == '__main__': print() print('This can be used to form a URL to give out for the access ') print('allowed. For example:') - print(' echo https://swift-cluster.example.com`%s GET 60 ' - '/v1/AUTH_account/c/o mykey`' % prog) + print(' echo \\"https://swift-cluster.example.com`%s GET 60 ' + '/v1/AUTH_account/c/o mykey`\\"' % prog) print() print('Might output:') - print(' https://swift-cluster.example.com/v1/AUTH_account/c/o?' + print(' "https://swift-cluster.example.com/v1/AUTH_account/c/o?' 'temp_url_sig=34d49efc32fe6e3082e411eeeb85bd8a&' - 'temp_url_expires=1323482948') + 'temp_url_expires=1323482948"') exit(1) method, seconds, path, key = argv[1:5] try: diff --git a/doc/source/api/temporary_url_middleware.rst b/doc/source/api/temporary_url_middleware.rst index 093bd528ec..1debf7d542 100644 --- a/doc/source/api/temporary_url_middleware.rst +++ b/doc/source/api/temporary_url_middleware.rst @@ -178,3 +178,8 @@ storage host name. For example, prefix the path with https://swift-cluster.example.com/v1/my_account/container/object ?temp_url_sig=5c4cc8886f36a9d0919d708ade98bf0cc71c9e91 &temp_url_expires=1374497657 + +Note that if the above example is copied exactly, and used in a command +shell, then the ampersand is interpreted as an operator and the URL +will be truncated. Enclose the URL in quotation marks to avoid this. +