[SOLVED] Getting Apache to return a 304 code.
by Mike Davies from LinuxQuestions.org on (#5C7X3)
I need Apache to return a 304 status from a perl cgi script.
As I understand it all I needed to do was generate 2 lines of output and no body text. e.g. something like.
print "HTTP/1.1 304 Not Modified\n\n";
But apache complains ...
malformed header from script 'test_script': Bad header: HTTP/1.1 304 Not Modified
I've never explicitly returned codes before in scripts. What am I doing wrong ?


As I understand it all I needed to do was generate 2 lines of output and no body text. e.g. something like.
print "HTTP/1.1 304 Not Modified\n\n";
But apache complains ...
malformed header from script 'test_script': Bad header: HTTP/1.1 304 Not Modified
I've never explicitly returned codes before in scripts. What am I doing wrong ?