Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble POSTing UTF-8 data #31

Closed
samtardif opened this issue Jun 13, 2012 · 1 comment
Closed

Trouble POSTing UTF-8 data #31

samtardif opened this issue Jun 13, 2012 · 1 comment

Comments

@samtardif
Copy link

I'm having some trouble POSTing UTF-8 content to Bitbucket's REST API. I see there are no tests covering UTF-8 content, so would like to get this verified.

If I make a POST request with the vanilla Requests library using a hardcoded auth=('un','pw) in my session I can submit content containing UTF-8 characters. If I make the same POST request via an authenticated session using requests-oauth Bitbucket gives me a 500 response. POST requests via requests-oauth that do not include UTF-8 content work just fine.

General approach is:

client = requests.session(hooks={
'pre_request': OAuthHook(access_token = tok,
access_token_secret = sec)
})
client.post(url, data=request.form)

I've verified the exact same content being sent works via curl and via a vanilla Requests library client.post(), so something seems funny with requests-oauth's handling of unicode content. Any thoughts?

maraujop added a commit that referenced this issue Jun 21, 2012
Thanks to @akhenakh for the patch from #GH-32, which fixes #GH-31
@maraujop
Copy link
Owner

I've pushed a fix for UTF-8 issues, this should be fixed now. Sorry for the inconvenience.

You can try version 0.4.1, it should be working now.

Cheers,
Miguel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants