[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Basic CGI using Kepler
- From: "Andre Carregal" <carregal@...>
- Date: Sat, 10 Jun 2006 17:53:05 -0300
> Kurt Jung wrote:
> I've been exploring Kepler's many capabilities and have found it to be remarkably versatile.
> However, one thing I can't seem to make it do is to process a simple Lua script like this:
> io.write('Content-Type: text/plain\n\n', os.date(), '\n')
> This is a simple stdout CGI script that works on all mainstream web
> servers. Kepler isn't logging any errors and appears to be trying to
> return the script as a static page. However, when I attempt to save it,
> it is empty. I am using Kepler as it is installed with the binary setup
> program on Windows, and have made no adjustments to its configurations
> files. The sample Lua page scripts and SAJAX script all work well.
> Can anyone point out what I may be doing wrong?
Kepler can be used with a set of launchers, each with its way to send and get data from the web server. So io.write() is not a valid way to do this.
I'm not sure about wich launching model and web server you are using, but it seems to be Xavante.
The correct way to send data to the client on Kepler is to use cgilua.put() and, as in your example, to send content type you should check the corresponding API on
This allows you to write and use the same Lua script (or Lua Page) in different web servers and launching models.
I hope this has helped and, if you don't mind, we can continue this thread on the Kepler list: