Ian Holsman wrote:
> On Thu, 12 Sep 2002 03:47:58 -0700, Paul J. Reder wrote:
>
>
>>Yes, I believe it should check r->args. I don't think you are stupid,
>>severely or otherwise... ;)
>>
> it should not make a difference really
> if r->args is null than the strcat should terminate there anyway ;-)
>
> on another note..
> Paul.. I'm not 100% on that hook for key-generation is working the
> way it should. are you still using that or are you going to always use
> the query-args/virtual host for every request, or are you going to provide
> 2 functions to generate the key (a fast/quick and a slow/flexible one?)
Well, I'm not adding a hook (or optional function). Currently the code
seems to be there to use the optional function if one is defined, but there
isn't one at present. The code seems to drop through to calling
cache_generate_key_default. I would assume that anyone who created and registered
a more complex cache_generate_key_foo function would be responsible for making
sure it functioned in a sane manner.
>
>>Pier Fumagalli wrote:
>>
>>
>>>"Kris Verbeeck" <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>
>>>>apr_status_t cache_generate_key_default( request_rec *r, apr_pool_t*p,
>>>>char**key )
>>>>{
>>>>- *key = apr_pstrdup(p,r->uri);
>>>>+ *key = apr_pstrcat(p,r->uri, "?", r->args, NULL);
>>>> return APR_SUCCESS;
>>>>}
>>>>
>>>>
>>>Hm... This should be something like:
>>>
>>>If (r->args) {
>>> *key = apr_pstrcat(p,r->uri, "?", r->args, NULL);
>>>} else {
>>> *key = apr_pstrdup(p,r->uri);
>>>}
>>>
>>>But I might be severely stupid...
>>>
>>> Pier
>>>
>>>
>>>
>>>
>>>
>
>
--
Paul J. Reder
-----------------------------------------------------------
"The strength of the Constitution lies entirely in the determination of each
citizen to defend it. Only if every single citizen feels duty bound to do
his share in this defense are the constitutional rights secure."
-- Albert Einstein