I'm working on a project to convert another custom templating system to Mason. They each have features missing from the other. I do not have the time to convert the whole thing right now and will do that over time, so I have the other system call Mason first, then it post-processes the output from Mason. This works, giving me features from both.
The other system has a caching system like Mason. When it sees that the page hasn't changed, it simply serves from its cache bypassing Mason altogether. The problem is when it calls Mason, there is an extra "Content-Type: text/html" being output after the headers which shows up at the top of the page. I have verified that this does not appear in the object cache for Mason nor in the cache for the other system. Subsequent requests for the page where the system bypasses Mason does not show this extra header. The code I put in the other templating engine to call Mason follows and I believe it is correct. I have verified that the extra header is not in $main::org_file after returning from Mason. It seems Mason is sending it directly to the server bypassing the out_method parameter: use HTML::Mason::CGIHandler; my $comp_root = $ENV{'DOCUMENT_ROOT'}; $comp_root =~ s{/$}{}; (my $data_dir = $comp_root) =~ s{/[^/]+$}{/mason}; my $h = HTML::Mason::CGIHandler->new ( comp_root => $comp_root, data_dir => $data_dir, use_object_files => 1, allow_globals => [qw(%session $u)], out_method => \$main::org_file, error_mode => "output", ); $h->handle_request; Any suggestions what is happening and how to suppress it? Thanks. Paul Wallingford ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users