Index: [Article Count Order] [Thread]

Date:  Sat, 06 Apr 2002 09:36:39 +0900
From:  GOTO Kentaro <gotoken@notwork.org>
Subject:  [webricken:92] Re: ai_family not supported (SocketError)
To:  webricken@notwork.org
Message-Id:  <87r8ltwtm0.wl@miso.k.notwork.org>
In-Reply-To:  <p05101501b8d3a88097ae@[192.168.1.2]>
References:  <Pine.LNX.4.33.0204050019360.21171-100000@fangora.fourthcrusade.com>	<p05101501b8d3a88097ae@192.168.1.2>
X-Mail-Count: 00092

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