Class: RefreshWithoutUrl

Inherits:
WEBrick::HTTPServlet::AbstractServlet
  • Object
show all
Defined in:
lib/mechanize/test_case.rb

Constant Summary collapse

@@count =
0

Instance Method Summary collapse

Instance Method Details

#do_GET(req, res) ⇒ Object



449
450
451
452
453
454
455
456
457
# File 'lib/mechanize/test_case.rb', line 449

def do_GET(req, res)
  res['Content-Type'] = "text/html"
  @@count += 1
  if @@count > 1
    res['Refresh'] = "0; url=http://localhost/index.html";
  else
    res['Refresh'] = "0";
  end
end