You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@gmail.com> on 2009/09/26 23:46:40 UTC

Re: svn commit: r777042 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_cache.xml modules/cache/cache_storage.c modules/cache/mod_cache.c modules/cache/mod_cache.h

On Thu, May 21, 2009 at 6:42 AM, <rp...@apache.org> wrote:

> Author: rpluem
> Date: Thu May 21 10:42:54 2009
> New Revision: 777042
>
> URL: http://svn.apache.org/viewvc?rev=777042&view=rev
> Log:
> * Add CacheIgnoreURLSessionIdentifiers directive to ignore
>  defined session identifiers encoded in the URL when caching.
>
> Modified:
>    httpd/httpd/trunk/CHANGES
>    httpd/httpd/trunk/docs/manual/mod/mod_cache.xml
>    httpd/httpd/trunk/modules/cache/cache_storage.c
>    httpd/httpd/trunk/modules/cache/mod_cache.c
>    httpd/httpd/trunk/modules/cache/mod_cache.h
>
> Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=777042&r1=777041&r2=777042&view=diff
>
> ==============================================================================
> --- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
> +++ httpd/httpd/trunk/modules/cache/mod_cache.c Thu May 21 10:42:54 2009
> @@ -952,6 +952,9 @@
>     /* flag indicating that query-string should be ignored when caching */
>     ps->ignorequerystring = 0;
>     ps->ignorequerystring_set = 0;
> +    /* array of identifiers that should not be used for key calculation */
> +    ps->ignore_session_id = apr_array_make(p, 10, sizeof(char *));
> +    ps->ignore_session_id_set = CACHE_IGNORE_SESSION_ID_UNSET;
>     return ps;
>  }
>
> @@ -1002,6 +1005,10 @@
>         (overrides->ignorequerystring_set == 0)
>         ? base->ignorequerystring
>         : overrides->ignorequerystring;
> +    ps->ignore_session_id =
> +        (overrides->ignore_session_id_set == CACHE_IGNORE_HEADERS_UNSET)
> +        ? base->ignore_session_id
> +        : overrides->ignore_session_id;
>     return ps;
>  }
>  static const char *set_cache_ignore_no_last_mod(cmd_parms *parms, void
> *dummy,
> @@ -1085,6 +1092,34 @@
>     return NULL;
>  }
>
> +static const char *add_ignore_session_id(cmd_parms *parms, void *dummy,
> +                                         const char *identifier)
> +{
> +    cache_server_conf *conf;
> +    char **new;
> +
> +    conf =
> +        (cache_server_conf
> *)ap_get_module_config(parms->server->module_config,
> +                                                  &cache_module);
> +    if (!strncasecmp(identifier, "None", 4)) {
> +        /* if identifier None is listed clear array */
> +        conf->ignore_session_id->nelts = 0;
>

This should be strcasecmp() since the entire parameter has to be "None", no?

Re: svn commit: r777042 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_cache.xml modules/cache/cache_storage.c modules/cache/mod_cache.c modules/cache/mod_cache.h

Posted by Ruediger Pluem <rp...@apache.org>.

On 09/26/2009 11:46 PM, Jeff Trawick wrote:
> On Thu, May 21, 2009 at 6:42 AM, <rp...@apache.org> wrote:
> 
>> Author: rpluem
>> Date: Thu May 21 10:42:54 2009
>> New Revision: 777042
>>
>> URL: http://svn.apache.org/viewvc?rev=777042&view=rev
>> Log:
>> * Add CacheIgnoreURLSessionIdentifiers directive to ignore
>>  defined session identifiers encoded in the URL when caching.
>>
>> Modified:
>>    httpd/httpd/trunk/CHANGES
>>    httpd/httpd/trunk/docs/manual/mod/mod_cache.xml
>>    httpd/httpd/trunk/modules/cache/cache_storage.c
>>    httpd/httpd/trunk/modules/cache/mod_cache.c
>>    httpd/httpd/trunk/modules/cache/mod_cache.h
>>
>> Modified: httpd/httpd/trunk/modules/cache/mod_cache.c

>> +                                                  &cache_module);
>> +    if (!strncasecmp(identifier, "None", 4)) {
>> +        /* if identifier None is listed clear array */
>> +        conf->ignore_session_id->nelts = 0;
>>
> 
> This should be strcasecmp() since the entire parameter has to be "None", no?

Make sense. Fixed in r819237.

Regards

RĂ¼diger