🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: "Malformed header" error: Apache/Linux

#22313
From: Dominik Fretz
Date: Thu, 20 May 1999 00:00
32 lines
1540 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");
>         printf("HTTP/1.0 200 OK\r\n");
>
> [snip]
> 
> Hope someone knows the answer.  Also, this is my first post to deja; if
> there's a more appropriate group to post this to, please let me know.
> 
> Thanks,
> Eric Raeburn
> raeburn@cup.hp.com

hi

IMHO has after the line: 'Content-type: text/html' to be a blank line.

test this out:
	printf("Content-type: text/html\r\n\r\n");
	printf("HTTP/1.0 200 OK\r\n");
	...

btw: why do you use \r\n?
in unix, all unix has \n for the line end \r\n is windows

hope that helps
Dominik
Technical Details
Message-ID: <374463EF.E5167AFB@linuxfreak.com>
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: Dominik Fretz <roboto@linuxfreak.com>
Subject: Re: "Malformed header" error: Apache/Linux
Date: 1999/05/20
Message-ID: <374463EF.E5167AFB@linuxfreak.com>
X-Deja-AN: 480235497
Content-Transfer-Encoding: 7bit
References: <7i1m07$c8a$1@nnrp1.deja.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@sunrise.ch
X-Trace: news1.sunrise.ch 927228912 26424 194.230.8.137 (20 May 1999 19:35:12 GMT)
Organization: sunrise communications ag
Mime-Version: 1.0
NNTP-Posting-Date: 20 May 1999 19:35:12 GMT
Newsgroups: ch.comp.os.linux