spulec/moto — pull request #79 by Zulunko (2014-01-07 21:37:51+00:00)
Title: Enables the usage of special characters in keys when using s3bucket_path

According to Amazon S3 documentation:

"The name for a key is a sequence of Unicode characters whose UTF-8 encoding is at most 1024 bytes long."
Source: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html

While bucket names are restricted to certain characters, key names are not. This change makes s3bucket_path use a '.+' regex to match keys rather than the '[a-zA-Z0-9\\-\_.]+' regex used to match buckets. In addition, I added a few more special characters to test_s3bucket_path.py's 'test_key_with_special_characters' test to ensure this change works.

This fixes issue #78.