Class: QuotedValueCookieServlet

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



412
413
414
415
416
417
418
419
# File 'lib/mechanize/test_case.rb', line 412

def do_GET(req, res)
  cookie = WEBrick::Cookie.new("quoted", "\"value\"")
  cookie.path = "/"
  cookie.expires = Time.now + 86400
  res.cookies << cookie
  res['Content-Type'] = "text/html"
  res.body = "<html><body>hello</body></html>"
end