Class: RefererServlet

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

Instance Method Summary collapse

Instance Method Details

#do_GET(req, res) ⇒ Object



436
437
438
439
# File 'lib/mechanize/test_case.rb', line 436

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

#do_POST(req, res) ⇒ Object



441
442
443
444
# File 'lib/mechanize/test_case.rb', line 441

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