note
chromatic
$ENV{REMOTE_USER} will give you the username, after it's been authenticated by the web server.
<p>
If you've built your own server out of something like [HTTP::Daemon], you can get a request object and grab the Authorization header to parse it yourself:
<code>my $r = $daemon->get_request();
my ($username, $password) = split(/:/, $r->header('Authorization'), 2);</code>
<p>
<strong>Update:</strong>
<p>
Yeah, that did say 'REQUEST_USER' before. Sorry, I merged the right line with the description of 'REQUEST_METHOD' as I read it.
17537
17537