On Tue, Oct 6, 2009 at 11:10 AM, Anders Holtsberg
<[email protected]> wrote:
> (Sorry for newbie question, but I really have Googled and can't figure this
> out)
>
> I want to emit Content-type: text/plain from my cgi-script sometimes.
> I tried this:
>
>> cat mytest.lua
> #!/usr/bin/env PATH=$PATH:/usr/local/lib/luarocks/bin cgilua.cgi
>
> --cgilua.htmlheader()
> cgilua.put('Content-type: text/plain\n\n')
> cgilua.put('HELLO!\n')
>
>> mytest.lua
> Status: 200
> Content-Length: 33
> Content-Type: text/html
>
> Content-type: text/plain
>
> HELLO!
>>
>
> Obviously the script still emits the HTML header even though
> cgilua.htmlheader() is NOT called.
> Could merciful person give me a hint?

You're looking for cgilua.contentheader("text", "plain")

See the CGILua reference: http://www.keplerproject.org/cgilua/reference.html

-- 
Dirk

_______________________________________________
Kepler-Project mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to