Alex -- you've definitely cut it down a lot, but have you tried cutting out
the Mason stuff and just making it a regular mod_perl handler that prints a
few lines? I'm fairly sure the problem is independent of Mason (although it
may be related to the structure of handler.pl). Try it and see if you can
still reproduce the problem. Every minimization step helps towards
pinpointing the bug.
Jon
At 12:00 PM 1/19/00 +0300, [EMAIL PROTECTED] wrote:
>
>I've cut down handler.pl to bare minimum.
>
>=== cut handler.pl ==
>#!/usr/bin/perl
># $Id: handler.pl,v 1.3 2000/01/14 19:42:16 tarkhil Exp $
>#
>$ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/
> or die "GATEWAY_INTERFACE not Perl!";
>use Apache::Registry;
>use Apache::Status;
>use Socket;
>use Carp qw(cluck confess);
>
>package HTML::Mason;
>use HTML::Mason;
>use strict;
>{
> package HTML::Mason::Commands;
> use Apache::Registry;
> use Apache::Status;
>}
>
>my $parser = new HTML::Mason::Parser
> (
># allow_globals => [qw($dbh)]
> );
>my $interp = new HTML::Mason::Interp
> (parser=>$parser,
> data_dir => "/usr/local/www/tmp",
> comp_root => "/usr/local/www");
>
>#$interp->set_global(dbh=>DBI->connect
># ("DBI:mysql:mail2pager",
># "tarkhil", "",
># { RaiseError => 1, PrintError => 1,
># AutoCommit => 1, }
>#));
>my $ah = new HTML::Mason::ApacheHandler (interp=>$interp,
>output_mode=>'batch');
>chown ( 60001, 60001, $interp->files_written );
>use Apache::Cookie;
>use Apache::Session::File;
>sub handler {
> my ($r) = @_;
> return -1
> if defined($r->content_type) && $r->content_type !~ m|^text/|io;
> my $cook = Apache::Cookie->new($r);
> my $cookie = $cook->get('SESSION_ID');
> my %session;
> tie %session, 'Apache::Session::File', $cookie;
> $cook->set(-name => "SESSION_ID", -value => $session{_session_id})
> if ( !$cookie );
>
> my $res = $ah->handle_request($r);
> untie %session;
> return $res;
>}
>
>1;
...