[issue22496] urllib2 fails against IIS (urllib2 can't parse 401 reply www-authenticate headers)

Daniel Holth report at bugs.python.org
Sat Sep 27 18:07:41 CEST 2014


Daniel Holth added the comment:

I am not the copyright holder, I only maintain the pypi package for
python-ntlm. I might have 10 lines of my own code in the whole package.

If running on Windows it would be great to have out of the box "native
windows NTLM" which can be done somehow with the win32 module, I
think...

It may also be possible to use Kerberos authentication (NTLMv2) instead
of NTLM in most cases these days; since after Windows 2000 according to
Wikipedia.

On Fri, Sep 26, 2014, at 01:51 AM, Senthil Kumaran wrote:
> 
> Senthil Kumaran added the comment:
> 
> Yes, urllib2 does not have any support for NTML based authentication. 
> And it is a long pending feature request too.
> 
> For 2.7, the best way to handle this might be, instead of crashing on
> WWW-Authenticate: Negotiate, which is a valid response from IIS (1). It
> should detect it and fail with a helpful message to use a 3rdparty
> handler along with urllib2 [2]
> 
> And for 3.5, I think it is worthy to consider adding the support in
> stdlib.
> @Daniel Holth - I see you are the owner of it. If we choose to adopt it,
> do you give permission to reuse portions of code (with correct
> attribution) in the stdlib?
> 
> 1) http://msdn.microsoft.com/en-us/library/ms995330#http-sso-2_topic1
> 2) https://code.google.com/p/python-ntlm/
> 
> ----------
> assignee:  -> orsenthil
> nosy: +dholth
> 
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue22496>
> _______________________________________

----------

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


More information about the Python-bugs-list mailing list