[Inteproxy-devel] Problems with .htaccess-secured sites in normal webproxy-mode
Bernhard Herzog
bh at intevation.de
Thu Apr 12 16:02:07 CEST 2007
On Thursday 12 April 2007 12:06, Stephan Holl wrote:
> while using InteProxy from trunk as a normal web-proxy with my brower
> (firefox) I encountered a problem on basic-auth-secured
> webpages.
[...]
> File "InteProxy.py", line 339, in find_user_password
> user, password = getpassword(title)
> NameError: global name 'getpassword' is not defined
I've fixed the immediate problem in SVN now (rev. 43).
You should be able to access the server now. However, it's InteProxy that
asks for the password now, not Firefox. It would be better to let the
browser handle the user interaction in this case.
It's not easy to fix it, though. The problem is that InteProxy uses urllib2
to connect to the remote hosts and urllib2 is a bit too intelligent for our
purposes in that it wants to handle the authentication itself. It would be
possible to override that but I suspect that similar problems will crop up in
the future too. Some of the problems we had in the past (e.g. issue #271)
were aleady at least partly due to the use of urllib2.
This automatic handling of authentication was one of the reasons to use
urllib2 originally, but back then InteProxy wasn't trying to be a regular
http proxy for use with normal browsers and other programs which can handle
such things themselves.
I suggest we ditch urllib2 and implement what little we actually need from the
http protocol ourselves, or at least use httplib instead.
Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.wald.intevation.org/pipermail/inteproxy-devel/attachments/20070412/90fbcf73/attachment.pgp
More information about the Inteproxy-devel
mailing list