Merge "Fix inline tempurl/formpost signature examples"

This commit is contained in:
Jenkins
2017-01-24 19:29:00 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""
r"""
FormPost Middleware
Translates a browser form post into a regular Swift object PUT.
@@ -86,7 +86,7 @@ sample code for computing the signature::
max_file_count = 10
expires = int(time() + 600)
key = 'mykey'
hmac_body = '%s\\n%s\\n%s\\n%s\\n%s' % (path, redirect,
hmac_body = '%s\n%s\n%s\n%s\n%s' % (path, redirect,
max_file_size, max_file_count, expires)
signature = hmac.new(key, hmac_body, sha1).hexdigest()

View File

@@ -28,7 +28,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""
r"""
TempURL Middleware
Allows the creation of URLs to provide temporary access to objects.
@@ -69,7 +69,7 @@ seconds on ``/v1/AUTH_account/container/object``::
expires = int(time() + 60)
path = '/v1/AUTH_account/container/object'
key = 'mykey'
hmac_body = '%s\\n%s\\n%s' % (method, expires, path)
hmac_body = '%s\n%s\n%s' % (method, expires, path)
sig = hmac.new(key, hmac_body, sha1).hexdigest()
Be certain to use the full path, from the ``/v1/`` onward.