httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: [users@httpd] Premature end of script headers using CGI appl in Linux
Date Thu, 10 Jul 2003 15:57:54 GMT
Andrus wrote:
>    goto CleanupAndExit;

Oh, dear ;-)

> // Return results to web server.
> while ( !feof( datFile ) )
> {
>     // prb: kas stdout on binaarne
>     int len;
>     len = fread( buffer, 1, DATA_BUFFER_LENGTH, datFile );
>     if (len==0) break;
>     fwrite( buffer, 1, len, stdout );

I cannot see that the Content-Type header is written before this statement
is executed.

> void errorform( char *errorstring, char *errortitle )
> {
>     printf( "Content-Type: text/html\n\n" );

At least on Windows, I have noted, <CRLF> must be written "\r\n", like:

printf("Content-Type: text/html\r\n\r\n");


Regards,
Robert Andersson




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message