Hi, attached a little example

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

echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>.:: fugu firewall ::.</title>
</head>'




2013/9/2 obsd, cgi <obsd...@postafiok.hu>

> http://unix.stackexchange.com/questions/88062/how-to-enable-cgi-in-openbsd
>
> How could someone use a CGI (with a shell script) on OpenBSD? What could
> the problem be?
>
> The CGI is this:
>
> # cat /var/www/htdocs/cgi-bin/SEARCH.cgi
> printf "Content-type: text/html\n\n";
> printf hi
>
> but it keeps saying:
>
>
> # cat /var/www/logs/error_log
> [Mon Aug 26 10:09:13 2013] [error] [client 10.0.2.2] Premature end of
> script headers: /htdocs/cgi-bin/SEARCH.cgi
> #
>
>
> yes, I tried many things..(permissions looks good, printf binary copied to
> chroot, httpd.conf looks ok..) several hours of pain.. can someone post a
> howto/URL?
>
> Thanks, have a better day :)

Reply via email to