On 31 Dec 2000, Stephen A. Cochran wrote:
> --- Stas Bekman wrote:
> On 17 Nov 2000, Stephen A. Cochran wrote:
> >
> > I have a program which runs fine 90% of the time under mod_perl. About 10% of
> > the time Netscape reports "Document contains no data". Looking at the socket
> > traffic, the client receives an orderly release indication (T_ORDEL_IND = 132)
> > on the socket and reponds with a orderly release request, which closes the
> > socket.
>
>
> run it in single mode and attach to the process with strace(1) or truss(1)
> (depending on what you have). See the debug chapter in the mod_perl guide.
> --- end of quote ---
>
> Thanks for the suggestions from the list for this problem. The strace/truss
> probably would have helped solve the problem, too bad Digital Unix doesn't have
> either : (
>
> After two months I finally tracked it down. Turns out that in an infrequently
> called sub to handle minor error conditions, there was a line "close STDERR".
> The comment from the author said it was to "kill any ugly errors that havne't
> made it out yet ...". Not really sure what he really wanted to do originally,
> but that was the problem.
>
> Anytime a process which had executed this code under mod_perl received another
> mod_perl request, the browser displayed the "Document contains no data" error
> due to the sequence of requests as described above in my original post. I just
> confirmed this with a short script which only does "close STDERR".
>
> Thought I'd post this in case someone else ever runs into this, or it's a bug.
> Not sure of closing STDERR is a common practice in CGIs, but maybe a gotcha for
> the porting guide.
If you replace:
close STDERR;
with:
open STDERR, '>/dev/null' or die "Can't write to /dev/null: $!";
do you still have the same problem?
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/