🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: ch.comp.os.linux
Article #22325

Re: "Malformed header" error: Apache/Linux

#22325
From: Andreas Umbach
Date: Fri, 21 May 1999 00:00
23 lines
1434 bytes
raeburn@cup.hp.com wrote:
: I'm doing a simple CGI script and am getting a "Malformed header" error,
: for no reason I can discern.  The platform is Apache 1.3.2 on Red Hat
: Linux 5.2.  The script looks like this:

: 	printf("Content-type: text/html\r\n");

Just for asthetic reasons, please remove the \r (*shudder*).

: 	printf("HTTP/1.0 200 OK\r\n");
: 	printf("MIME-version: 1.0\r\n");
: 	printf("Server: SRVPROJ 2.0\r\n");

Why on earth would you want to output this? The CGI output goes to the
server (who will supply these header lines), not to the client.

If you really want to supply ALL HTTP headers (then the 'HTTP/1.0 200
OK' is mandatory and you can use the above code unmodified), call your
script 'nph-something.whatever'. The nph- prefix tells apache not to do
anything with the script headers and spit out unmodified whatever you
throw at it.

- Andreas
Technical Details
Message-ID: <37450ccc.0@pfaff.ethz.ch>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7i1m07$c8a$1@nnrp1.deja.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f4b73,92af197bb4c85018
X-Google-Attributes: gidf4b73,public
From: Andreas Umbach <aumbach@g26.ethz.ch>
Subject: Re: "Malformed header" error: Apache/Linux
Date: 1999/05/21
Message-ID: <37450ccc.0@pfaff.ethz.ch>
X-Deja-AN: 480437873
Sender: Andreas Michael Umbach <aumbach@slab2.ethz.ch>
References: <7i1m07$c8a$1@nnrp1.deja.com>
X-Trace: 21 May 1999 09:35:40 +0100, slab2.ethz.ch
User-Agent: tin/pre-1.4-980618 (UNIX) (SunOS/5.6 (sun4u))
Newsgroups: ch.comp.os.linux