[OFF] Re: [V4RB] Writing a simple server

jda jda at his.com
Sat Feb 15 18:53:47 CST 2003


>
>The info about authentication (the simplest one is "Basic") is in
>section 10.4.2 and 11.
>
>The basics: the client sends a header line like this with the request:
>    Authorization: Basic xxxxxxxxxxxxx
>
>where "xxxxxxxxxxxxx" is an Base64 encoded string consisting of the
>username, a colon, and the password. The the username or password is not
>valid or the whole Autorization header missing, the server sends a "401
>Unauthorized" response instead of the document.
>

OK, I've looked at the rfc and understand what is needed. What I 
don't quite see is how do I get the browser to send the Authorization 
information. When I get a hit, do I respond with a 401 message? But 
how would the browser interpret that (put up a name and password 
dialog on its own -- I think not). Or do I make my own name and 
passoword input fields in the web page -- that's easy, but I don't 
see how to join them and send them as base64.

So my naive question is, how do I get the browser to send the 
authorization data?

Thanks,

Jon


More information about the Valentina mailing list