たむらです。
On Wed, 18 Dec 2002 01:26:25 +0900 (JST)
GOTOU Yuuzou <gotoyuzo@notwork.org> wrote:
> ええと、これでいかがでしょう。
>
> def basic_auth(req, res)
> STDERR.puts "basic auth ..."
> if proc = Proc.new{|user,pass|
> - user = 'ruby' && pass = encode64('matz')
> + user == 'ruby' && pass == 'matz'
> } then
> realm = "Basic Auth"
> WEBrick::HTTPAuth::basic_auth(req,res,realm,&proc)
> end
> req.header.delete("basic-authorization")
> end
ありがとうございます。ビンゴでした。
# しかし、はずかしすぎなミスだ。結局
# WEBrick::HTTPAuth::basic_auth(req,res,realm,&proc) がスルーして
# 認証ダイアログが表示されなかったという訳か。
--
たむら (http://tamura.tdiary.net)