From owner-freebsd-questions@FreeBSD.ORG Tue Sep 30 05:23:00 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 C112116A4B3 for ; Tue, 30 Sep 2003 05:23:00 -0700 (PDT) Received: from homer.bignose.ca (bignose.ca [216.126.83.242]) by mx1.FreeBSD.org (Postfix) with SMTP id 5D2CD43FA3 for ; Tue, 30 Sep 2003 05:22:59 -0700 (PDT) (envelope-from info@bignose.ca) Received: (qmail 27633 invoked from network); 30 Sep 2003 12:22:54 -0000 Received: from unknown (HELO jeff3vc1phnqhx) (156.34.43.251) by bignose.ca with SMTP; 30 Sep 2003 12:22:54 -0000 From: "Jeff MacDonald" To: "'Rob Ellis'" , "'Charles Howse'" Date: Tue, 30 Sep 2003 09:29:39 -0300 Message-ID: <000001c3874e$84b02100$c800a8c0@jeff3vc1phnqhx> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal In-Reply-To: <20030930122043.GA4771@web.ca> 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:00 -0000 put another echo after the first one. >> -----Original Message----- >> From: owner-freebsd-questions@freebsd.org >> [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of Rob Ellis >> Sent: Tuesday, September 30, 2003 9:21 AM >> To: Charles Howse >> Cc: freebsd-questions@freebsd.org >> Subject: Re: Cgi help - malformed header from script. Bad header >> >> >> On Tue, Sep 30, 2003 at 07:01:21AM -0500, Charles Howse wrote: >> > Hi, >> > FBSD 4.8-RELEASE-p10, Apache2. >> > >> > 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') >> > >> > 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. >> > >> > 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=Oct 1 Jimmy >> Carter born, >> > 192,:cal >> > >> > ScriptAlias is defined properly in httpd.conf, and I get >> the proper >> > output from test-cgi. >> > >> > I've read the Apache2 documentation on CGI, and troubleshooting >> > errors, no joy. >> > >> > How can I fix this? >> > >> >> you need a blank line after the content-type header: >> >> > #!/bin/sh >> > echo Content-type: text/plain >> echo >> > /usr/bin/calendar >> >> - rob >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> >> http://lists.freebsd.org/mailman/listinfo/freebs>> d-questions >> >> >> To unsubscribe, send any mail to >> "freebsd-questions-unsubscribe@freebsd.org" >>