Lyle wrote:
> Hi All,
>   Every time I've setup ActivePerl on IIS, be it IIS 5, 6 or now 7, 
> everything I print to STDERR gets sent to the browser.
> 
> This can cause some weird problems. This simple test script:-
> 
> #!perl
> print "Content-type:text/plain\n\n";
> print "TEST\n";
> print STDERR "STDERR test\n";
> 
> 
> Causes the following error on IIS7
> <h2>HTTP Error 502.2 - Bad Gateway</h2>
>   <h3>The specified CGI application misbehaved by not returning a 
> complete set of HTTP headers.  The headers it did return are "STDERR test
> Content-type:text/plain
> 
> TEST
> ".</h3>
> 
> So even though the STDERR test is printed last, it's going to the 
> browser first.
> 
> Is this a problem with IIS config? Any pointers?

Try unbuffering stdout - chances are your stdout is not getting
out till after the stderr print.    $| = 1;
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to