Article 5C7X3 [SOLVED] Getting Apache to return a 304 code.

[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 ?latest?d=yIl2AUoC8zA latest?i=N2utLZguxKo:SsAEq9rMqDs:F7zBnMy latest?i=N2utLZguxKo:SsAEq9rMqDs:V_sGLiP latest?d=qj6IDK7rITs latest?i=N2utLZguxKo:SsAEq9rMqDs:gIN9vFwN2utLZguxKo
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments