On Saturday, April 5, 2003, at 11:50 PM, Jan Oberländer wrote:

Hi,

I know that A::A::P::QueryStringCache is used to hash the query string
as well, to get pages with different query strings cached into different
files. This is pretty much what I want, but I also know that this leads
to a potential DoS target as one can 'bomb' the system with lots of
different query strings.

In my special case, I use two query string parameters that change the
page content, and thus I would like these parameters to be included in
the URL hash for the cache file. One parameter is a style parameter,
limited to, say, two or three different styles (using
A::A::StyleChooser::QueryString); the second is a language parameter of
the form 'lang=en' etc., limited to a handful of language codes that
will actually be used.

Actually - this would be trivial.

Currently, A::A::StyleChooser::QueryString does the following:

sub handler {
my $r = shift;
$r->notes('axkit_cache_extra', $r->notes('axkit_cache_extra') . $r->args);
return OK;
}

All thats required is to only append what you want to the axkit_cache_extra note.

So something like:

sub handler {
    my $r = shift;
    my %args = $r->args;

if ($args{lang} == 'en') {
$r->notes('axkit_cache_extra', $r->notes('axkit_cache_extra') . 'english');
}
}

My question: has something like this been done? If not, I suppose I
should adapt A::A::P::QueryStringCache to achieve this. I have not yet
looked at the sources; also, I am not sure how to best pass the config
parameters. Would it, in your eyes, make sense to implement such a
'limited' QueryStringCache?

Don't know if it's been done before.

As an aside, I might be using A::A::StyleChooser::UserAgent as well. How
does that currently integrate with caching?

I guess it does similar to the above (with the DOS issue).

Regards,
Chris

Attachment: PGP.sig
Description: This is a digitally signed message part



Reply via email to