class DigestAuthServlet

Public Instance Methods

do_GET(req,res) click to toggle source
# File lib/mechanize/test_case.rb, line 160
def do_GET(req,res)
  def req.request_time; Time.now; end
  def req.request_uri; '/digest_auth'; end
  def req.request_method; "GET"; end

  begin
    @@authenticator.authenticate(req,res)
    res.body = 'You are authenticated'
  rescue WEBrick::HTTPStatus::Unauthorized
    res.status = 401
  end
  FileUtils.rm('digest.htpasswd') if File.exists?('digest.htpasswd')
end
Also aliased as: do_POST
do_POST(req,res) click to toggle source
Alias for: do_GET