Sha256: 09763aa638180eeff06b3692b6bc601c336e5f205a15c4a02cf467947c2b8d6e

Contents?: true

Size: 402 Bytes

Versions: 6

Compression:

Stored size: 402 Bytes

Contents

class InfiniteRefreshServlet < WEBrick::HTTPServlet::AbstractServlet
  def do_GET(req, res)
    address = "#{req.host}:#{req.port}"
    res['Content-Type'] = req.query['ct'] || "text/html"
    res.status = req.query['code'] ? req.query['code'].to_i : '302'
    number = req.query['q'] ? req.query['q'].to_i : 0
    res['Refresh'] = "0;url=http://#{address}/infinite_refresh?q=#{number + 1}";
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
mechanize-2.7.7 lib/mechanize/test_case/infinite_refresh_servlet.rb
husc-0.2.1 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/test_case/infinite_refresh_servlet.rb
husc-0.2.0 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/test_case/infinite_refresh_servlet.rb
husc-0.1.1 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/test_case/infinite_refresh_servlet.rb
husc-0.1.0 vendor/bundle/gems/mechanize-2.7.6/lib/mechanize/test_case/infinite_refresh_servlet.rb
mechanize-2.7.6 lib/mechanize/test_case/infinite_refresh_servlet.rb