Scott Penrose wrote:
Hey Guys

I wrote a simple Filter which calls a subrequest - and started by doing
this very simply along the SSI style lines...

Please note - that although I could do this on the fly rather than
buffer, the end result for my code requires capture of the content, so
just imagine that bit is correct :-)

sub filter {
... buffer content into $context->{buffer} ...

if ($f->seen_eos) {

my $buffer = $context->{buffer};

while ((my $i = index($buffer, "EXPAND")) >= 0) {
$f->print(substr($buffer, 0, $i));
$buffer = substr($buffer, $i + 6);

my $subr = $f->r->lookup_uri("/sub.html");

The above code always segfaults. Now the first thing that came to mind
was that a $subr->run() would output by printing to stderr which of
course would not work in the filter. Therefore I changed the code,
using the Apache2::TrapSubRequest module to...
Is this a request or a connection filter? It won't work as a connection
filter (r is not available there).

What's the core's backtrace?

Stas Bekman mailto:stas@stason.org http://stason.org/
MailChannels: Reliable Email Delivery http://mailchannels.com
The "Practical mod_perl" book http://modperlbook.org/
http://www.linkedin.com/in/stasbekman http://perl.apache.org/
http://stason.org/photos/gallery/ [* best photos here *]

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 16 | next ›
Discussion Overview
groupmodperl @
categoriesmodperl, perl
postedJun 19, '06 at 1:34a
activeAug 8, '06 at 4:12a



site design / logo © 2018 Grokbase