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:40:10 GMT
This is not linux, but I am curious as to why you
would ask.

Apache is running under my uid talking to port 12345.
It works fine when I request a static html doc.

Yes, the script runs OK from the command line.
-chaz


From: Renaud Bruyeron <renaud@w3.org>
Are you under linux ? Is your apache installation running inside a
chroot ?
does the above script run fine from the command line ?
Have you tried after su-ing to user nobody (or whatever user id your
apache process runs as) ?
 - Renaud


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
>     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