Class: RefreshWithEmptyUrl

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



478
479
480
481
482
483
484
485
486
# File 'lib/mechanize/test_case.rb', line 478

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; url=";
  end
end