newLISP Fan Club

Forum => Anything else we might add? => Topic started by: aseph on September 16, 2008, 03:36:19 PM

Title: cgi reponse codes in -http mode
Post by: aseph on September 16, 2008, 03:36:19 PM
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
Title:
Post by: Lutz on September 16, 2008, 06:20:05 PM
Yes, you would have to use 'command-event' to fully customize the response header.
Title:
Post by: itistoday on October 24, 2008, 11:11:46 AM
I also had this problem and did a lot of digging, see: http://www.alh.net/newlisp/phpbb/viewtopic.php?p=13835 (//http)
Title:
Post by: Lutz on October 25, 2008, 01:36:15 AM
In the next development version you can preset the status header to a different content.
Title:
Post by: itistoday on October 25, 2008, 11:43:49 AM
Quote from: "Lutz"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! :-)