Merge "Added quotes to example echo in swift-temp-url"

This commit is contained in:
Jenkins 2016-07-26 18:57:08 +00:00 committed by Gerrit Code Review
commit f978133cfd
2 changed files with 9 additions and 4 deletions

View File

@ -40,13 +40,13 @@ if __name__ == '__main__':
print() print()
print('This can be used to form a URL to give out for the access ') print('This can be used to form a URL to give out for the access ')
print('allowed. For example:') print('allowed. For example:')
print(' echo https://swift-cluster.example.com`%s GET 60 ' print(' echo \\"https://swift-cluster.example.com`%s GET 60 '
'/v1/AUTH_account/c/o mykey`' % prog) '/v1/AUTH_account/c/o mykey`\\"' % prog)
print() print()
print('Might output:') 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_sig=34d49efc32fe6e3082e411eeeb85bd8a&'
'temp_url_expires=1323482948') 'temp_url_expires=1323482948"')
exit(1) exit(1)
method, seconds, path, key = argv[1:5] method, seconds, path, key = argv[1:5]
try: try:

View File

@ -178,3 +178,8 @@ storage host name. For example, prefix the path with
https://swift-cluster.example.com/v1/my_account/container/object https://swift-cluster.example.com/v1/my_account/container/object
?temp_url_sig=5c4cc8886f36a9d0919d708ade98bf0cc71c9e91 ?temp_url_sig=5c4cc8886f36a9d0919d708ade98bf0cc71c9e91
&temp_url_expires=1374497657 &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.