using mod_filter on non-200 responses
I'm trying to use mod_filter (specifically mod_substitute) on non-200
responses, specifically with a 404 response. After playing around for
a while and assuming that i had screwed something up, i discovered
that mod_filter specifically skips non-200 responses [1]. Is there an
important reason for skipping such responses? would a patch to make
skipping such responses configurable be accepted into the main distro
if i wrote it?
thanks,
andy
1.
static apr_status_t filter_harness(ap_filter_t *f, apr_bucket_brigade *bb)
{
apr_status_t ret;
const char *cachecontrol;
char *str;
harness_ctx *ctx = f->ctx;
ap_filter_rec_t *filter = f->frec;
if (f->r->status != 200) {
ap_remove_output_filter(f);
return ap_pass_brigade(f->next, bb);
}
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Re: using mod_filter on non-200 responses
Andrew Huntwork wrote:
> I'm trying to use mod_filter (specifically mod_substitute) on non-200
> responses, specifically with a 404 response. After playing around for
> a while and assuming that i had screwed something up, i discovered
> that mod_filter specifically skips non-200 responses [1]. Is there an
> important reason for skipping such responses?
I am not the developer here, but I would imagine that one reason would
be that 4xx responses are generally configurable anyway, so why go
through the additional overhead of filtering them ?
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Re: using mod_filter on non-200 responses
the 404 content is coming from mod_proxy_http, so it's not under my control
On Thu, Dec 10, 2009 at 12:20 PM, Andr=E9 Warnier <aw [at] ice-sa.com> wrote:
> Andrew Huntwork wrote:
>>
>> I'm trying to use mod_filter (specifically mod_substitute) on non-200
>> responses, specifically with a 404 response. =A0After playing around for
>> a while and assuming that i had screwed something up, i discovered
>> that mod_filter specifically skips non-200 responses [1]. =A0Is there an
>> important reason for skipping such responses?
>
> I am not the developer here, but I would imagine that one reason would be
> that 4xx responses are generally configurable anyway, so why go through t=
he
> additional overhead of filtering them ?
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project=
..
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
> =A0" =A0 from the digest: users-digest-unsubscribe [at] httpd.apache.org
> For additional commands, e-mail: users-help [at] httpd.apache.org
>
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Re: using mod_filter on non-200 responses
Andrew Huntwork wrote:
> the 404 content is coming from mod_proxy_http, so it's not under my control
Ok, I take it back. That sounds like a good reason..
>
> On Thu, Dec 10, 2009 at 12:20 PM, André Warnier <aw [at] ice-sa.com> wrote:
>> Andrew Huntwork wrote:
>>> I'm trying to use mod_filter (specifically mod_substitute) on non-200
>>> responses, specifically with a 404 response. After playing around for
>>> a while and assuming that i had screwed something up, i discovered
>>> that mod_filter specifically skips non-200 responses [1]. Is there an
>>> important reason for skipping such responses?
>> I am not the developer here, but I would imagine that one reason would be
>> that 4xx responses are generally configurable anyway, so why go through the
>> additional overhead of filtering them ?
>>
>>
>> ------------------------------------------------------------ ---------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
>> " from the digest: users-digest-unsubscribe [at] httpd.apache.org
>> For additional commands, e-mail: users-help [at] httpd.apache.org
>>
>>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
> " from the digest: users-digest-unsubscribe [at] httpd.apache.org
> For additional commands, e-mail: users-help [at] httpd.apache.org
>
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Re: using mod_filter on non-200 responses
On 10 Dec 2009, at 18:38, Andrew Huntwork wrote:
> I'm trying to use mod_filter (specifically mod_substitute) on non-200
> responses, specifically with a 404 response. After playing around for
> a while and assuming that i had screwed something up, i discovered
> that mod_filter specifically skips non-200 responses [1]. Is there an
> important reason for skipping such responses? would a patch to make
> skipping such responses configurable be accepted into the main distro
> if i wrote it?
That seems like a reasonable enhancement request.
A good way to pursue it would be to enter it as an enhancement
request in bugzilla. That gives us a record of it, and you something
to refer to if you want to gently bug the dev list.
--
Nick Kew
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org