I am using an Apache Server and I wrote a CGI to spit out a HTML Page, basically (for now)returning the submitted parameters.
I am using it on the LocalHost in order to get a feel of how these things work.
The page is also printed to File.
When trying to fire the CGI, I get the Following Error.:
[Mon Aug 09 23:34:58 2010] [error] [client 127.0.0.1] malformed header from script. Bad header=<HTML>: EchoHtm.cgi, referer: http:
However, the printed page is perfectly acceptable to both the server and the browser.
example:
<pre>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Softguard\EchoHtm.cgi">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Default</TITLE>
</HEAD>
<BODY>
<TABLE border="1">
<tr>
<th width="25%">Parameter</th>
<th width="55%">Value</th>
</tr>
<tr>
<td width="25%">AccNr<br></td>
<td width="55%">12345<br></td>
</tr>
<tr>
<td width="25%">UserId<br></td>
<td width="55%">abcde<br></td>
</tr>
</TABLE>
</BODY>
</HTML>
Is there something I am Missing ?
The Page is Called by the Following HTML File:
<pre>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Developer Studio">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Softguard Sales and Support</TITLE>
</HEAD>
<BODY>
<center>
<H1>Welcome to Softguard</H1><br>
<Form Action="cgi-bin/EchoHtm.cgi" Method="GET" >
<H2>Please enter your Account Number and User ID</H2><br>
<Table Border=0 Cellspacing =20 width=400 height=20>
<TR><TD><P>Account Number</td><td><input type="text" Name="AccNr" size=48>
</td></tr>
<TR><TD><P>User ID</td><td><input type="text" Name="UserId" size=48>
</td></tr>
</Table>
<input type="submit" Value="Submit">
<input type="Reset" Value="Reset">
</Form>
</BODY>
</HTML>
Is this an Apache Configuration Issue, or, is a page generated by a cgi supposed to have some extra magic incantations in the header.
Regards
Bram van Kampen