httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Sliger" <c...@reliant.com>
Subject Re: Premature end of script headers
Date Tue, 09 Mar 1999 23:45:55 GMT
I've tried the echo both ways.
Also tried it as a perl script. Got the same error.
All versions of the script run OK from the command line
and produce the expected html.
Does anyone know exactly what Apache means when it says that
the headers have ended prematurely?
Is it referring to the "Content-type text/html" line?
-chaz

On Tue, 9 Mar 1999, Charles Sliger wrote:
> Using libwww-perl, I issue a "GET" request to the server
> with a cgi script as the target.
> The server pukes on the script and writes an error in the log.
> Can anyone tell me what the server might be looking for in
> the 'headers' of this script?
> -chaz
> 
> GET request:
>     $r = &http_fetch("GET", "/cgi-bin/bas_mod_env.cgi");
> 
> Error Text:
>     httpd: [Tue Mar  9 17:21:32 1999] [error] [client 127.0.0.1] Premature
>     end of script headers: /usr/home/chaz/av/tmp/cgi-bin/bas_mod_env.cgi
> 
> CGI Script:
>     #!/bin/sh
>     echo 'Content-type: text/html'
>     echo

From: Dean Gaudet <dgaudet@arctic.org>
Maybe this doesn't do the right thing to terminate the headers...
does echo '' work instead?
Dean

>     echo '<html>'
>     echo '  <head>'
>     echo '    <title>Test Page for Apache Test Suite</title>'
>     echo '  </head>'
>     echo '  <body>'
>     echo '  <h1>It Worked!</h1>'
>     echo '  </body>'
>     echo '</html>'
> 
> 


Mime
View raw message