Skip to content

Commit

Permalink
Perl: reworked perl module to pass ctx instead of request.
Browse files Browse the repository at this point in the history
This ensures that correct ctx is always available, including after
filter finalization.  In particular, this fixes a segmentation fault
with the following configuration:

    location / {
        image_filter test;

        perl 'sub {
            my $r = shift;
            $r->send_http_header();
            $r->print("foo\n");
            $r->print("bar\n");
        }';
    }

This also seems to be the only way to correctly handle filter finalization
in various complex cases, for example, when embedded perl is used both
in the original handler and in an error page called after filter
finalization.
  • Loading branch information
mdounin committed Jul 12, 2019
1 parent 60e7480 commit eae5e4d
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 94 deletions.
Loading

0 comments on commit eae5e4d

Please sign in to comment.