fujita/swift3 — pull request #47 by blaxter (2013-05-10 09:39:11+00:00)
Title: Allow non-ascii characters on buckets and objects

I haven't figure out a easy way to create unit test for this so I'm gonna try to explain the issue and the solution.

#### Url encoded

Each controller in its constructor set `env['PATH_INFO']` which is a variable that will be used by [swift.common.swob.Request](https://github.com/openstack/swift/blob/master/swift/common/swob.py#L798) object to know the path requested by the client.

`swob.Request` returns this value (path property) applying `urllib2.quote()`, that means it expects this value not to be url encoded. So, right now, in cases where we have received a request already urlencoded this will result in a double urlencoded value. For example spaces will be saved as '%2520' instead of ' ' (because urlib2.quote('%20') == '%2520').

To fix this, we only have to unquote the value set in `env['PATH_INFO']`

#### utf8 chars on objects

This one is easy and is related with the previous fix. Until now we were storing the data with names urlencoded, with the previous fix now the names are save normally so we have to encode the names that are unicode.

Please, feel free to ask me about anything if something is not well explained.