class RefreshWithEmptyUrl

Public Instance Methods

do_GET(req, res) click to toggle source
# File lib/mechanize/test_case/refresh_with_empty_url.rb, line 3
def do_GET(req, res)
  address = "#{req.host}:#{req.port}"

  res.content_type = "text/html"
  @@count += 1
  if @@count > 1
    res['Refresh'] = "0; url=http://#{address}/";
  else
    res['Refresh'] = "0; url=";
  end
end