Chris' journal has moved to chris.boyle.name - Python bug? (urllib2.HTTPDigestAuthHandler) [entries|archive|friends|userinfo]
Chris Boyle

[ website | chris.boyle.name ]
[ userinfo | insanejournal userinfo ]
[ archive | journal archive ]

Python bug? (urllib2.HTTPDigestAuthHandler) [Dec. 12th, 2008|10:10 pm]
Previous Entry Add to Memories Tell a Friend Next Entry

[Tags|, ]
[Mood | confused]
[Music |Iris - New Invaders]

This script, when edited to fill in valid LiveJournal credentials (or InsaneJournal, if you change the URL and user list) fails for me in a very odd way. It fetches the first two URLs quite happily, and returns a 401 on the third after querying my password manager about 6 times. Even if you shuffle the user list around, increase the sleep, etc etc... I seem to be able to request as many such URLs from LJ as I like, in separate Python executions, or with different HTTPDigestAuthHandler objects, but any given instance of HTTPDigestAuthHandler will always fail on the third use. Failing on the second use would be more understandable, but three? WTF?

Edit: Filed as Python bug 4683, comments go there.
Link