Date: Tue, 30 Sep 2003 07:31:04 -0500 From: "Charles Howse" <chowse@charter.net> To: "'Andreas Kohn'" <andreas.kohn@gmx.net> Cc: freebsd-questions@freebsd.org Subject: RE: Cgi help - malformed header from script. Bad header Message-ID: <006001c3874e$ba64c170$04fea8c0@moe> In-Reply-To: <1064924628.669.5.camel@klamath>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Tue, 2003-09-30 at 14:01, Charles Howse wrote: > > Hi, > > FBSD 4.8-RELEASE-p10, Apache2. > >=20 > > My first cgi-bin program. > > I have the following files in /usr/local/www/cgi-bin: > > Cal (-rwxr-xr-x) > > Calendar (-rw-r--r-- typical calendar file to display 'today in > > history') > >=20 > > Cal contains the following lines: > > #!/bin/sh > > echo Content-type: text/plain > > /usr/bin/calendar > > ------ > > If I cd to /usr/loca/www/cgi-bin, and do ./cal, > > I get the echo, plus the expected output. > >=20 > > When I request, http://howse.no-ip.org/cgi-bin/cal > > I get an Internal Server Error. > > The error logfile says: > > Malformed header from script. Bad header=3DOct 1 Jimmy=20 > Carter born, > > 192,:cal > >=20 > > ScriptAlias is defined properly in httpd.conf, and I get the proper > > output from test-cgi. > >=20 > > I've read the Apache2 documentation on CGI, and=20 > troubleshooting errors, > > no joy. > >=20 > > How can I fix this? > >=20 > >=20 > Hi,=20 >=20 > Header and content of the HTTP response have to be separated=20 > by an empty > line. >=20 > #!/bin/sh > echo Content-type: text/plain > echo "" > /usr/bin/calendar >=20 > should work. Hoooray! It works now! Thanks to all who responded. NOW...take a look at http://howse.no-ip.org And then look at http://howse.no-ip.org/cgi-bin/cal Where is the documentation on how to get the calendar info into a web page that looks like my default?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?006001c3874e$ba64c170$04fea8c0>