Index: [Article Count Order] [Thread]

Date: Thu, 29 Apr 2004 18:31:54 +1000
From: Mark Reid <mark@threewordslong.com>
Subject: [webricken:125] Help creating a HTTP tunnel using WEBrick
To: webricken@notwork.org
Message-Id: <4090BD7A.2030804@threewordslong.com>
In-Reply-To: <200404291700.FMLAAB83118.webricken@notwork.org>
References: <4090B59E.4050806@threewordslong.com> <200404291700.FMLAAB83118.webricken@notwork.org>
X-Mail-Count: 00125

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.

Thanks in advance,

Mark.

----
    [1]: http://www.instiki.org/