Malformed header from script cgi

If you want to run a bash script as a CGI and get this message:

[Sun Feb 07 19:51:59.424071 2016] [cgi:error] [pid 4265] [client x.x.x.x:50952] malformed header from script '': Bad header: Searching via name..

Make sure to put an additional echo in your script after the content type

echo "Content-type: text/html"

Thanks for reading this post!

If you found an issue in this article, you can create an issue on Github.

If you have a comment or question, please drop me a line below!