pegasy / python-ntlm

Automatically exported from code.google.com/p/python-ntlm
0 stars 0 forks source link

custom urllib2.build_opener argument list #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, I'm one of the maintainers for the feedparser project.

I've just received a bug report that I have no way of helping troubleshoot nor 
test fixes:

https://code.google.com/p/feedparser/issues/detail?id=267

The relevant line in the feedparser project is:

    opener = apply(urllib2.build_opener, tuple(handlers + [_FeedURLHandler()]))

The NTLM handler is included in the single-element `handlers` list. 
`_FeedURLHandler` inherits from:

 * HTTPDigestAuthHandler
 * HTTPRedirectHandler
 * HTTPDefaultErrorHandler

which means that those three are not included in the implicit handler list, and 
are not tried before the NTLM handler. The original reporter has said that 
removing the reference to `FeedURLHandler` in the code above fixes the problem, 
so I'm suspecting that this has something to do with the order of the handlers 
maintained by the opener.

Is it possible for someone from the python-ntlm project to help me resolve this 
issue?

Original issue reported on code.google.com by kurtmckee on 18 Apr 2011 at 9:41