#!/usr/local/bin/ruby -Ke
require "web/application/simple"

class TestApp < Web::Application::Simple
  def do_start(req, rsp)
    rsp.content_type = "text/html; charset=EUC-JP"
    rsp << "<html>"
    rsp << "<head><title>Test Application</title></head>"
    rsp << "<body>"
    req.query.each {|key,value|
      rsp << "#{h(key)} : #{h(value)}<br>"
    }
    rsp << "</body>"
    rsp << "</html>"
  end
  
  def do_x(req, rsp)
    rsp.content_type = "text/html; charset=EUC-JP"
    rsp << "<html>"
    rsp << "<head><title>Test Application</title></head>"
    rsp << "<body>"
    req.query.each {|key,value|
      rsp << "#{h(key)} : #{h(value)}<br>"
    }
    rsp << "</body>"
    rsp << "</html>"
  end
end
