Search code examples
linuxwebservercgiboa

boa webserver, sh script


I have here embedded device with linux. There is a webserver boa. http://www.boa.org/

I am trying to start sh cgi script.

#!/bin/sh
echo "Content-type: text/html\n"
echo "Hello world !"

./script.cgi works, but in webbrowser I get

502 Bad Gateway The CGI was not CGI/1.1 compliant.

Can anyone help me?


Solution

  • echo -e "Content-type: text/html\r\n\r\n"