lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


	Hi Gilles

	I don't know anything about mini-httpd nor Haserl, but according
to the examples, I would change the last line to:

<%= "Hello World" %>

	Note the '='.

	Regards,
		Tomás

On Tue, 28 Jan 2014, Gilles Ganault wrote:

On Tue, 28 Jan 2014 10:46:29 -0200 (BRST), Tomas Guisasola Gorham
<tomas@tecgraf.puc-rio.br> wrote:
	Have you tried the examples in Haserl's man-page:

http://haserl.sourceforge.net/manpage.html#lbAJ

	Anyway, if you are seeing the source code, it seems the
interpreter (which should be /usr/bin/haserl) is not being called...
Are you sure the configuration file you showed in the message was loaded
by the server?

Thanks for the idea. Indeed, the following line in mini-httpd.conf was
wrong:
=================
#BAD?cgipat=**.cgi,**.lua
cgipat=**.lua
=================

Also, the script was missing the "content-type" line:
=================
#!/usr/bin/haserl --shell=lua
content-type: text/html

<% io.write ("Hello World" ) %>
=================

Without it, mini-httpd returns "Bad response. The server or forwarder
response doesn't look like HTTP."

Thanks all.