Index: [Article Count Order] [Thread]

Date: Thu, 29 Apr 2004 10:24:29 +0100
From: Dick Davies <rasputnik@hellooperator.net>
Subject: [webricken:126] Re: Help creating a HTTP tunnel using WEBrick
Sender: Rasputin <rasputin@idoru.mine.nu>
To: webricken@notwork.org
Message-Id: <20040429092428.GA20323@lb.tenfour>
In-Reply-To: <4090BD7A.2030804@threewordslong.com>
References: <4090B59E.4050806@threewordslong.com> <200404291700.FMLAAB83118.webricken@notwork.org> <4090BD7A.2030804@threewordslong.com>
X-Mail-Count: 00126

* Mark Reid <mark@threewordslong.com> [0435 09:35]:
> Hello,
> 
> I have recently started using the [Instiki][1] wiki which is written as 
> a WEBrick server running on port 2500 and would like to write a CGI 
> script to open it up to the web on port 80. The idea is to have the CGI 
> script act as a HTTP "tunnel" between port 80 and port 2500.
> 
> I have looked through the source for WEBrick classes such as 
> `HTTPProxyServer` and `WEBrick::CGI` but there isn't enough 
> documentation for me to understand how everything works. Is there a 
> simple way for a CGI script to create `HTTPRequest` and `HTTPResponse` 
> instances and then pass them to the Instiki server at localhost:2500? 
> When Instiki has processed the request, the idea is to then make its 
> response the output of the CGI script.

I'd use something like mod_proxy to do that - see the recent thread
on ruby-talk about just this issue.
-- 
We don't understand the software, and sometimes we don't understand the
hardware, but we can *___see* the blinking lights!
Rasputin :: Jack of All Trades - Master of Nuns