require 'reqnora' require 'web' def noratest(req,rsp) rsp.content_type = 'text/html; charset=Shift_JIS' rsp.content_language = 'ja' rsp.content_encoding = 'text' rsp.write <<-EOS Nora Test

Nora Test

EOS # attr rsp << "" rsp << "" rsp << "" rsp << "" rsp << "" rsp << "" rsp << "" rsp << "" rsp << "" rsp << "" rsp << "
method#{Web::escapeHTML(req.method)}
query_string#{Web::escapeHTML(req.query_string)}
script_name#{Web::escapeHTML(req.script_name)}
path_info#{Web::escapeHTML(req.path_info)}
host#{Web::escapeHTML(req.host)}
remote_addr#{Web::escapeHTML(req.remote_addr)}
remote_host#{Web::escapeHTML(req.remote_host)}
remote_ident#{Web::escapeHTML(req.remote_ident || '')}
remote_user#{Web::escapeHTML(req.remote_user || '')}
" # query rsp << "

query

" rsp << "" req.query.each {|key,value| rsp << "" } rsp << "
#{Web::escapeHTML(key)}#{Web::escapeHTML(value.inspect)}
" # form rsp << "

form

" rsp << "" req.form.each {|key,value| rsp << "" } rsp << "
#{Web::escapeHTML(key)}#{Web::escapeHTML(value.inspect)}
" rsp << "

Web::Request

" rsp << "

" << Web::escapeHTML(req.inspect) << "

" rsp << "

Web::Response

" rsp << "

" << Web::escapeHTML(rsp.inspect) << "

" rsp << "

ENV

" ENV.each {|key,value| rsp << Web::escapeHTML(key) << ":" << Web::escapeHTML(value) << "
" } rsp.write <<-EOS EOS rsp end api = Web::Interface::ModRuby.new req = api.request rsp = Web::Response.new rsp = noratest(req, rsp) api.response req, rsp