[Python-Dev] [PATCH] Add an authorization header to the initial request.

2014-02-11 Thread Matěj Cepl
Many websites (e.g. GitHub API) on the Internet are intentionally not following RFC with regards to the Basic Authorization and require Authorization header in the initial request and they never return 401 error. Therefore it is not possible to authorize with such websites just using urllib2.py

Re: [Python-Dev] [PATCH] Add an authorization header to the initial request.

2014-02-11 Thread Terry Reedy
On 2/11/2014 6:03 AM, Matěj Cepl wrote: Suggested fix for bug# 19494 This is my first attempt to contribute to Python itself, so please be gentle with me. Yes, I know that I miss unit tests and port to other branches of Python (this is against 2.7), but I would like first some feedback to see

Re: [Python-Dev] [PATCH] Add an authorization header to the initial request.

2014-02-11 Thread Matěj Cepl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2014-02-11, 12:27 GMT, you wrote: This is my first attempt to contribute to Python itself, so please be gentle with me. Yes, I know that I miss unit tests and port to other branches of Python (this is against 2.7), but I would like first

Re: [Python-Dev] [PATCH] Add an authorization header to the initial request.

2014-02-11 Thread Eric V. Smith
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/11/2014 08:04 AM, Matěj Cepl wrote: On 2014-02-11, 12:27 GMT, you wrote: This is my first attempt to contribute to Python itself, so please be gentle with me. Yes, I know that I miss unit tests and port to other branches of Python (this is