HTTP authentication

plugin-dev

#1

I was toying with coding up a plugin, and noticed a rather annoying oversight.

HTTP.py has no support for any form of authentication.



I needed to use digest authentication, so had to skip using any of the nice

http caching stuff and instead make direct calls to liburl functions (meh).



The following code is all it takes to install a handler, so it shouldn't be hard to add

support inside the HTTP.py routines (the four values in add_password would be

arguments of course):



  authhandler = urllib2.HTTPDigestAuthHandler()<br />
  authhandler.add_password(realm, url, username, password)<br />
  opener = urllib2.build_opener(authhandler)<br />
  urllib2.install_opener(opener)