Temp URLs and object names requiring URL encoding

asked 2014-09-08 17:19:13 -0600

Barryl gravatar image

How do you generate a temp URL for an object when the object name has a space in it such as "My Object"?

The docs indicate that I should generate the URL as usual with out URL encoding the object name but then URL encode the result before sending it, but when I do this I get an error saying the object cannot be found. If I do not URL encode it I get a bad request error.

For example if the generated URL looked like this:

https://swift-cluster.example.com/v1/AUTH_account/c/My Object?temp_url_sig=34d49efc32fe6e3082e411eeeb85bd8a&temp_url_expires=1323482948

I should be able to access it with:

curl -L -D - 'https://swift-cluster.example.com/v1/AUTH_account/c/My%20Object?temp_url_sig=34d49efc32fe6e3082e411eeeb85bd8a&temp_url_expires=1323482948'

If the object name doesn't contain a space it works.

edit retag flag offensive close merge delete