From owner-freebsd-questions@FreeBSD.ORG Tue Sep 30 05:23:34 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48CB616A4B3 for ; Tue, 30 Sep 2003 05:23:34 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 1129C43FF2 for ; Tue, 30 Sep 2003 05:23:33 -0700 (PDT) (envelope-from andreas.kohn@gmx.net) Received: (qmail 16373 invoked by uid 65534); 30 Sep 2003 12:23:31 -0000 Received: from unknown (EHLO [172.16.32.190]) (212.204.32.190) by mail.gmx.net (mp006) with SMTP; 30 Sep 2003 14:23:31 +0200 X-Authenticated: #2431876 From: Andreas Kohn To: Charles Howse In-Reply-To: <005301c3874a$93fc9700$04fea8c0@moe> References: <005301c3874a$93fc9700$04fea8c0@moe> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-+2gzvFDYb5xr/fV4YhL/" Message-Id: <1064924628.669.5.camel@klamath> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Tue, 30 Sep 2003 14:23:48 +0200 cc: freebsd-questions@freebsd.org Subject: Re: Cgi help - malformed header from script. Bad header X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2003 12:23:34 -0000 --=-+2gzvFDYb5xr/fV4YhL/ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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 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 troubleshooting errors, > no joy. >=20 > How can I fix this? >=20 >=20 Hi,=20 Header and content of the HTTP response have to be separated by an empty line. #!/bin/sh echo Content-type: text/plain echo "" /usr/bin/calendar should work. > Thanks, > Charles >=20 > Got a computer with idle CPU time? > Join SETI@home and help make history! > http://setiathome.ssl.berkeley.edu/ >=20 >=20 > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" --=20 Andreas Kohn --=-+2gzvFDYb5xr/fV4YhL/ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQA/eXXUYucd7Ow1ygwRAjKxAJ9kXraTjU842k7kA4ISM0fWr9Ev/gCgkn3k FIZ765XKYrknMcDDuDu+zU0= =7/8w -----END PGP SIGNATURE----- --=-+2gzvFDYb5xr/fV4YhL/--