Class: RefererServlet

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

Instance Method Summary collapse

Instance Method Details

#do_GET(req, res) ⇒ Object



3
4
5
6
# File 'lib/mechanize/test_case/referer_servlet.rb', line 3

def do_GET(req, res)
  res['Content-Type'] = "text/html"
  res.body = req['Referer'] || ''
end

#do_POST(req, res) ⇒ Object



8
9
10
11
# File 'lib/mechanize/test_case/referer_servlet.rb', line 8

def do_POST(req, res)
  res['Content-Type'] = "text/html"
  res.body = req['Referer'] || ''
end