🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: "Malformed header" error: Apache/Linux

#22321
From: Berger Bruno
Date: Fri, 21 May 1999 00:00
33 lines
1558 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");

You have to replace this DOS/Windoze-stuff "\r\n" with "\n" ... or at
the END of the header it NEEDS two
"\n"!!                                              

>         printf("HTTP/1.0 200 OK\r\n");

Is this correct? I have never seen this in a CGI, normaly this line is
used in the communication between browser and server... but maybe I am
wrong

a the begining start only with few lines in the header like this:


        printf("Content-type: text/html\n");
        printf("Pragma: no-cache\n\n");         // Note the TWO
Linefeeds !
        printf("<HTML> <BODY>\n");
        printf("Welcome to the big website\n");
        printf("</BODY> </HTML>\n");

Greetings from Bern

Bruno
Technical Details
Message-ID: <3744FEAD.3B332D38@mbox.bfi.admin.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: Berger Bruno <bruno.berger@mbox.bfi.admin.ch>
Subject: Re: "Malformed header" error: Apache/Linux
Date: 1999/05/21
Message-ID: <3744FEAD.3B332D38@mbox.bfi.admin.ch>
X-Deja-AN: 480421786
Content-Transfer-Encoding: 7bit
References: <7i1m07$c8a$1@nnrp1.deja.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Trace: 21 May 1999 08:35:27 +0100, grimsel.unibe.ch
MIME-Version: 1.0
Newsgroups: ch.comp.os.linux