Page 1 of 1

cgi reponse codes in -http mode

Posted: Tue Sep 16, 2008 10:36 pm
by aseph
Id like to return a 204 from a cgi script
but it seems the newlisp http mode always sends
200 if the cgi is successful.

What I am looking for is to be able to hit the cgi and have
it process, but no return no results and life the browser
stay in the same page.

I tried doing something like this

#! /bin/bash
echo "HTTP/1.0 204 No Response"
echo "Status: 204 No Response"

but no joy
do i need to use a command-event ?

thanks

Posted: Wed Sep 17, 2008 1:20 am
by Lutz
Yes, you would have to use 'command-event' to fully customize the response header.

Posted: Fri Oct 24, 2008 6:11 pm
by itistoday
I also had this problem and did a lot of digging, see: http://www.alh.net/newlisp/phpbb/viewtopic.php?p=13835

Posted: Sat Oct 25, 2008 8:36 am
by Lutz
In the next development version you can preset the status header to a different content.

Posted: Sat Oct 25, 2008 6:43 pm
by itistoday
Lutz wrote:In the next development version you can preset the status header to a different content.
Thank you! This will make testing websites locally so much easier! :-)