surjit / oauth

Automatically exported from code.google.com/p/oauth
0 stars 0 forks source link

Python library: OAuthRequest.to_postdata() and OAuthRequest.to_header() fail when OAuthRequest.parameters contains unicode strings containing non-ASCII characters #126

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Simply run the attached script.

I tried to fix it. In the definitions of the functions to_postdata() and
to_header(), I replaced str() with _utf8_str(), and it worked.

Original issue reported on code.google.com by violinw...@gmail.com on 30 Sep 2009 at 7:09

Attachments:

GoogleCodeExporter commented 8 years ago
Confirming this issue and the fix proposed by violinwise. Interestingly enough,
get_normalized_parameters does perform the required encoding to UTF-8.

Original comment by ralphm.net on 4 Nov 2009 at 4:45

GoogleCodeExporter commented 8 years ago
Would be nice if this gets fixed at some point... :)
I attached the proposed patch.

Original comment by scherpenisse on 17 Nov 2009 at 12:05

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by morten.f...@gmail.com on 5 Jan 2010 at 11:34

GoogleCodeExporter commented 8 years ago
I just ran into this problem using the Ubuntu 10.10 python-oauth package.
Applying the above issue-126.patch from comment 2 fixed it for me.

Original comment by hsw.open...@gmail.com on 6 Dec 2010 at 7:56