At Fri, 5 Apr 2002 14:26:27 -0500,
Brad Cox wrote:
> Here's my test servlet; with trivial mods to the hello servlet. The
> do_POST method is a plausible guess, which didn't work:
> require 'webrick/httpserver'
You don't need this line actually. "require 'webrick'" loads all
webrick/ libraries except for httpproxy.rb, which is special one.
> require 'webrick'
> include WEBrick
[snip]
> <h1>hello, world</h1>
> <p>
> <form action="http://192.168.1.3:8989/ile" method="POST">
Change "http://192.168.1.3:8989/ile" to
"http://192.168.1.3:8989/ile/"
and form params can be handled by req.query["val"].
> <p>request: #{req.inspect}</p>
Note that this line potentially has XSS (cross-site-scripting)
vulnerability. So this should be
<p>request: #{HTMLUtils::escape req.inspect}</p>
-- Gotoken