Bugs: Browse | Submit New | Admin

[#29125] S3Object#url_for doesn't escape special characters in filenames

Date:
2011-04-13 16:49
Priority:
3
Submitted By:
Alex T (alexeits)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
S3Object#url_for doesn't escape special characters in filenames

Detailed description
Some characters that are valid in filenames but invalid in URLs aren't handled properly by the url_for method. For example,
a call

AWS::S3::S3Object.url_for('/path/to/a&b.pdf', 'my_bucket') 

produces something like 

http://s3.amazonaws.com/my_bucket/path/to/a&b.pdf?AWSAccessKeyId=...

The "&" character is invalid in the path component of the URL and it should be escaped:

http://s3.amazonaws.com/my_bucket/path/to/a%26b.pdf?AWSAccessKeyId=...

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item