You know, I just can't fucking leave well enough alone. This morning
(e:paul) mailed me a short Surebert script to do logins,
which works, yet I'm still hacking this HTTP auth problem. Stay The Course, right?
But I got it solved. 1: Never send 401 Unauthorized without a WWW-Authenticate header. It's not allowed, and you'll get what you deserve. RFC 2617
briefly mentions using 400 Bad Request to report miscellaneous failures to the browser, and sure enough, that resets Safari. 2: If the script detects a failure, send another request to the same URL using a bogus username. This will of course fail, resetting Firefox in the process [thanks
(e:kookcity2000)]. I think that's a gruesome hack, but if it works it works.
Why do I care about HTTP authentication? Most importantly, I want to support authenticated, noninteractive web services [specifically an authenticated RSS feed]. Since this code will have to live in my server somewhere, I might as well get some mileage out of it. HTTP Digest is often overlooked but it's a nice middle ground between static hashes [which are plaintext-equivalent] and full-blown encryption [CPU load].
Source code available upon request.
- Z
You have GOT to answer her in the affirmative, but tell her your motor oil plan got nixed in favor of olive oil.
HAAAAAA!
That's awesome.
I can't decide whether that message sounds incredibly juvenile, incredibly naughty, or both.