Fix for urls with non-ascii characters being double encoded. #9

wants to merge 1 commit into from

3 participants


Urls to be shorted were being double-encoded. This would fail if a url actually contained any non-ascii characters. Connection.shorten was encoding the url via url.encode('UTF-8'). This, however, was already being done in the _call method. I removed the encoding in shorten.


Yep, having the same issue. Although maybe it's better to test if uri is instance of str in the _call method and only encode then. The _call method is where the second potentially redundant encode takes place.

Bitly member

this is fixed in version 0.2 of the library.

@jehiah jehiah closed this Jan 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment