jgarzik / python-bitcoinrpc

Python interface to bitcoin's JSON-RPC API
GNU Lesser General Public License v2.1
642 stars 307 forks source link

Fix: Decode auth header, to not encode it as b'...' in the HTTP request #11

Closed devurandom closed 11 years ago

devurandom commented 11 years ago

Currently, the authpair is encoded as b'...' within the HTTP request, which is obviously wrong. This commit fixes it.

gandaro commented 11 years ago

This should definitely be included. Works in Python 2 and 3.

luke-jr commented 11 years ago

Since the header needs to be encoded eventually, the original method stored the header as bytes rather than a string. This regression came from 2736b3d9ce1b67cec9daf6e0c9a20ed56b3ff2e7. It might be ideal to just do the same as it used to do, in case for any reason someone needs to use a non-UTF8 user/pass.

gandaro commented 11 years ago

Oh, sorry! I thought the .encode would not have such an impact. It's probably better to do it how it was.

luke-jr commented 11 years ago

23 also fixes this in a more compatible way.

jgarzik commented 11 years ago

Closed, obsolete