[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

Matej Cepl report at bugs.python.org
Tue Feb 11 01:15:23 CET 2014


Matej Cepl added the comment:

This is the suggested patch for this issue. Just adding new http_request method of HTTPBasicAuthHandler which adds Authorization header to the initial request.

Patch is now just for python 2.7, but it may be trivially ported to any other version of Python as it uses just normal urllib2 methods.

No HG repo, just the git one at http://luther.ceplovi.cz/git/cpython.git/commit/?id=basicAuth19494 (that's branch basicAuth19494).

----------
keywords: +patch
Added file: http://bugs.python.org/file34031/0001-Add-an-authorization-header-to-the-initial-request.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19494>
_______________________________________


More information about the Python-bugs-list mailing list