cgi reponse codes in -http mode

For the Compleat Fan
Locked
aseph
Posts: 2
Joined: Mon Sep 08, 2008 9:41 pm

cgi reponse codes in -http mode

Post 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

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Yes, you would have to use 'command-event' to fully customize the response header.

itistoday
Posts: 429
Joined: Sun Dec 02, 2007 5:10 pm
Contact:

Post by itistoday »

I also had this problem and did a lot of digging, see: http://www.alh.net/newlisp/phpbb/viewtopic.php?p=13835
Get your Objective newLISP groove on.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

In the next development version you can preset the status header to a different content.

itistoday
Posts: 429
Joined: Sun Dec 02, 2007 5:10 pm
Contact:

Post 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! :-)
Get your Objective newLISP groove on.

Locked