You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Torsten Förtsch <to...@gmx.net> on 2004/10/19 20:11:22 UTC

[mp2] a content filter was added without a request: includes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I am getting such errors:

[Tue Oct 19 18:36:28 2004] [error] a content filter was added without a 
request: includes

for _every_ request when using PerlSetOutputFilter instead of SetOutputFilter

I am using apache 2.0.52 with mp 1.99_16.

The message comes from server/util_filter.c:

    if (frec->ftype < AP_FTYPE_PROTOCOL) {
        if (r) {
            outf = r_filters;
        }
        else {
            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
                      "a content filter was added without a request: %s", 
frec->name);
            return NULL;
        }
    }
    else if (frec->ftype < AP_FTYPE_CONNECTION) {
        if (r) {
            outf = p_filters;
        }
        else {
            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
                         "a protocol filter was added without a request: %s", 
frec->name);
            return NULL;
        }
    }
    else {
        outf = c_filters;
    }

The PerlSetOutputFilter directive is placed in a <VirtualHost> block but 
outside of any <Directory> or <Location>.

Placing it into a <Location> block makes the messages disappear.

In both cases the filter does work.

Torsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBdVjOwicyCTir8T4RAg4rAJ48qAwm5QM0GnEG3FKcF/nPp+PlNgCfSoC8
Y28icyrRRKacwmG2WGgxKrU=
=5eeJ
-----END PGP SIGNATURE-----

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] a content filter was added without a request: includes

Posted by Stas Bekman <st...@stason.org>.
Torsten Förtsch wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Thursday 21 October 2004 05:28, Stas Bekman wrote:
> 
>>Please try the attached fix (I'm afraid you'd get lines wrapped, so I
>>didn't inline it). I'll commit it when 1.99_17 is released.
> 
> 
> Yes, it works.

It's now committed. Thanks Torsten.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] a content filter was added without a request: includes

Posted by Torsten Förtsch <to...@gmx.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 21 October 2004 05:28, Stas Bekman wrote:
> Please try the attached fix (I'm afraid you'd get lines wrapped, so I
> didn't inline it). I'll commit it when 1.99_17 is released.

Yes, it works.

Torsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBd2hnwicyCTir8T4RAqwFAJ0XttSg1Eoh1OB+Bx+RzwpBNM1vvQCeMrx/
cX5xmVN7zlGH21VwP0S3pkY=
=sWeg
-----END PGP SIGNATURE-----

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] a content filter was added without a request: includes

Posted by Stas Bekman <st...@stason.org>.
Torsten F�rtsch wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Wednesday 20 October 2004 02:17, Stas Bekman wrote:
> 
>>Can you please show the relevant configuration parts?
> 
> 
> The attached archive contains 3 files TEST, conf/extra.conf.in and t1.t. 
> Running "perl TEST" shows 5 succeeding tests for me. Test 1 and test 5 expect 
> the error to appear.
> 
> The relevant configuration parts are shown in conf/extra.conf.in:
> 
> - -------------------------------------------------------------------------------
> <VirtualHost PerlSetOutputFilter>
> PerlSetOutputFilter INCLUDES
> </VirtualHost>

Thanks for the test Torsten (btw there is a new interface for checking the 
error_log files without destroying them :) See t/lib/TestCommon/LogDiff

Please try the attached fix (I'm afraid you'd get lines wrapped, so I 
didn't inline it). I'll commit it when 1.99_17 is released.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: [mp2] a content filter was added without a request: includes

Posted by Torsten Förtsch <to...@gmx.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 20 October 2004 02:17, Stas Bekman wrote:
> Can you please show the relevant configuration parts?

The attached archive contains 3 files TEST, conf/extra.conf.in and t1.t. 
Running "perl TEST" shows 5 succeeding tests for me. Test 1 and test 5 expect 
the error to appear.

The relevant configuration parts are shown in conf/extra.conf.in:

- -------------------------------------------------------------------------------
<VirtualHost PerlSetOutputFilter>
PerlSetOutputFilter INCLUDES
</VirtualHost>

<VirtualHost SetOutputFilter>
SetOutputFilter INCLUDES
</VirtualHost>

<VirtualHost Location>
<Location />
PerlSetOutputFilter INCLUDES
</Location>
</VirtualHost>

<VirtualHost Directory>
<Directory />
PerlSetOutputFilter INCLUDES
</Directory>
</VirtualHost>
- -------------------------------------------------------------------------------

Only the first VHost generates the error message.

Torsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBdlkvwicyCTir8T4RAihwAJ9RHYsDUKfdyJJpbnynu9X6c77XkQCfSzwK
JevllW91ZtswCeYNwIzgp6M=
=XN6z
-----END PGP SIGNATURE-----

Re: [mp2] a content filter was added without a request: includes

Posted by Stas Bekman <st...@stason.org>.
Torsten Förtsch wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> I am getting such errors:
> 
> [Tue Oct 19 18:36:28 2004] [error] a content filter was added without a 
> request: includes
> 
> for _every_ request when using PerlSetOutputFilter instead of SetOutputFilter
[...]
> The PerlSetOutputFilter directive is placed in a <VirtualHost> block but 
> outside of any <Directory> or <Location>.
> 
> Placing it into a <Location> block makes the messages disappear.
> 
> In both cases the filter does work.

Can you please show the relevant configuration parts?

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html