Commit 8d7593d1 authored by Xavier Guimard's avatar Xavier Guimard

Fix SecureToken to be able to use it with other servers (#595)

parent 047e1cf9
......@@ -106,18 +106,20 @@ sub run {
# Remove token
eval 'use Apache2::Filter' unless ( $INC{"Apache2/Filter.pm"} );
$r->add_output_filter(
sub {
my $f = shift;
while ( $f->read( my $buffer, 1024 ) ) {
$f->print($buffer);
if ( $INC{"Apache2/Filter.pm"} ) {
$r->add_output_filter(
sub {
my $f = shift;
while ( $f->read( my $buffer, 1024 ) ) {
$f->print($buffer);
}
if ( $f->seen_eos ) {
$class->_deleteToken($key);
}
return $class->OK;
}
if ( $f->seen_eos ) {
$class->_deleteToken($key);
}
return $class->OK;
}
);
);
}
# Return $class->OK
return $class->OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment