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

Closed
wants to merge 1 commit into from

3 participants

@kylemcc

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.

@karamazov

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.

@jehiah
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