Export to GitHub

httplib2 - issue #234

Http.add_credentials should not accept unicode


Posted on Nov 7, 2012 by Happy Ox

What steps will reproduce the problem? 1. Http.add_credentials(u'username', u'password') 2. Set request body to utf8-encoded str 3. Execute request

What is the expected output? What do you see instead?

Expect either add_credentials to encode username and password to ut8, or to raise an exception. What happens instead is, it blows up on step 3 trying to concatenate unicode (headers) and str (body). The problem took some time to track down. Failing early at add_credentials() would help a lot.

What version of the product are you using? On what operating system?

httplib2 0.7.6 on Ubuntu 10.04.

Status: New

Labels:
Type-Defect Priority-Medium