Oct 12, 2011

malformed header from script. - CGI Bash

A CGI bash script will throw error as malformed header from script. in the web server error log when the content is not spaced, To eliminate this error give a empty line/newline after content.

#!/bin/bash
echo "Content-type: text/html"
echo
the log may look like this,
[Tue Oct 11 14:09:42 2011] [error] [client 172.16.32.215] malformed header from script. Bad header=TEST: test.html

No comments:

Post a Comment