[twill] Bug? in HTTP Basic Authentication Handling
titus at caltech.edu
Fri Mar 2 09:10:23 PST 2007
> Hi John,
> thanks for answering. I digged a lot deeper now into the code... and I
> installed the latest mechanize code separately and tried it out. The
> latest mechanize version works correct, I can access the site easily
> with a simple script.
> I did then something ugly ;-) - I copied the latest mechanize code
> over the mechanize code provided by twill to see if the bug is purely
> within mechanize. It still doesn't work with Twill, so I suggest that
> somehow the 2.4er tweaking (I use 2.4) from the side of twill is the
[ ... ]
> What I found also interesting is that twill installs a own HTTPHandler
> (for whatever reason, I don't know what WSGI is...). Maybe this is the
> cause (_browser.py)?
Actually, I suspect that *this* code is the problem:
def __init__(self, *args, **kwargs):
# fix basic auth.
self.handler_classes['_basicauth'] = FixedHTTPBasicAuthHandler
You did exactly the right thing in trying out the new mechanize code
with twill; that helps me nail down the problem. I'll see what I can do
about it this weekend.
p.s. Is there any way you could send plain text instead of HTML? My
mail reader doesn't support HTML very nicely, which is generally a good
thing but is causing problems with your e-mail ;)
More information about the twill