I want to have a CGI script return a 204 response so that the calling page doesn't change but I can't get it to work cleanly such that I don't get an error as follows:-
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
The CGI script is currently just:-
echo HTTP/1.0 204 No Change echo Content-type: text/html echo
The apache error log says:-
[Sat Jan 21 16:19:24 2012] [error] [client 192.168.1.4] malformed header from script. Bad header=HTTP/1.0 204 No Change: wikiedit.cgi, referer: http://wiki/info:money:jessica?do=edit
Removing the "echo Content-type: text/html" makes no difference at all. According to what I can find on Google about "204 No Change" it's all I should need.
Any ideas?
On Sat, Jan 21, 2012 at 04:25:20PM +0000, Chris Green wrote:
I want to have a CGI script return a 204 response so that the calling page doesn't change but I can't get it to work cleanly such that I don't get an error as follows:-
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.
The CGI script is currently just:-
echo HTTP/1.0 204 No Change echo Content-type: text/html echo
... and the answer is very simple, it should be:-
echo Status: 204 No Change echo
The apache error log says:-
[Sat Jan 21 16:19:24 2012] [error] [client 192.168.1.4] malformed header from script. Bad header=HTTP/1.0 204 No Change: wikiedit.cgi, referer: http://wiki/info:money:jessica?do=edit
It was searching for this plus "204 No Change" that found the answer. I got the "HTTP/1.0 204 No Change" from one of the few pages that told how to do it (wrong!).