RE: Cgi help - malformed header from script. Bad header

From: Jeff MacDonald (info_at_bignose.ca)
Date: 09/30/03

  • Next message: Andreas Kohn: "Re: Cgi help - malformed header from script. Bad header"
    To: "'Rob Ellis'" <rob@web.ca>, "'Charles Howse'" <chowse@charter.net>
    Date: Tue, 30 Sep 2003 09:29:39 -0300
    
    

    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"
    >>

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Andreas Kohn: "Re: Cgi help - malformed header from script. Bad header"

    Relevant Pages

    • Re: Need to remove a ghost file, but cant because it doesnt exist
      ... The only somewhat "special" characters in it are a comma, ... $ echo 1141914051.* ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: diff files matching a pattern
      ... The size really doesn't matter for those extra large files. ... # pattern must be in double quotes to avoid shell expasion ... echo $co files compared. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: bash scripting q
      ... It pumps the elapsed time to stdout. ... How do I use that $a in command parameters, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: Re: Re: Proper way to prevent a device (thats unrecognized)fromhotplugging?
      ... Preston ... Proper way to prevent a device fromhotplugging? ... and I just set it up so that it detects what is being inserted and calls the apropriate scripts ... To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list ...
      (Fedora)
    • /media and /mnt ownership and permissions
      ... I know this isn't proper. ... My setting up a sidux on X61s ... Should /media be owned by root/floppy? ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)