You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andrew Huntwork <as...@huntwork.net> on 2009/12/10 19:38:54 UTC
[users@httpd] 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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] using mod_filter on non-200 responses
Posted by André Warnier <aw...@ice-sa.com>.
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...@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@httpd.apache.org
>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@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@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] using mod_filter on non-200 responses
Posted by Andrew Huntwork <as...@huntwork.net>.
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é Warnier <aw...@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@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] using mod_filter on non-200 responses
Posted by André Warnier <aw...@ice-sa.com>.
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] using mod_filter on non-200 responses
Posted by Andrew Huntwork <as...@huntwork.net>.
[moving this over to dev@]
Thanks Nick. I have filed a bug [1]. Developers, please consider
yourselves gently bugged about this hopefully small enhancement to
make mod_filter able to process non-200 responses.
Thanks,
Andy
1. https://issues.apache.org/bugzilla/show_bug.cgi?id=48377
On Thu, Dec 10, 2009 at 5:12 PM, Nick Kew <ni...@webthing.com> wrote:
>
> 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@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] using mod_filter on non-200 responses
Posted by Nick Kew <ni...@webthing.com>.
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org