httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject RE: [PATCH] caching and query strings
Date Thu, 12 Sep 2002 14:38:14 GMT
Kris,
Thank you for your contribution.

I committed the patch to mod_cache.c. Paul Reder is doing some work in the
code to generate the search key and will incorporate your patch when he is
complete.

Bill

> Hi,
>
> Some of our QA people discovered a problem when performing request
> with a query string on a mod_cache enabled Apache 2.0.40 setup.
>
>   Request 1:  /test.html?x=1&y=3
>   Request 2:  /test.html?x=2&y=4
>
> Performing request 1 triggers mod_cache to store the response in its
> cache.  When performing request 2, the data from request 1 is returned
> because mod_cache only uses the URI when generating a cache key.  The
> patch that is attached will fix this.
>
> According to RFC 2616 (HTTP/1.1) paragraph 13.9:
>
>   "...: since some applications have traditionally used GETs
>    and HEADs with query URLs (those containing a "?" in the
>    rel_path part) to perform operations with significant side
>    effects, caches MUST NOT treat responses to such URIs as
>    fresh unless the server provides an explicit expiration
>    time."
>
> The fix does the following:
> 1. decline caching when there is a query string present and
>    no 'Expires' header is found (mod_cache.c)
> 2. use 'URI' + '?' + 'query string' has the hash key instead
>    of only the URI (cache_storage.c)
>
> --
> ir. Kris Verbeeck
> Development Engineer
>
> Ubizen - Ubicenter - Philipssite 5 - 3001 Leuven - Belgium
> T:  +32 16 28 70 64
> F:  +32 16 28 70 77
>
> Ubizen - We Secure e-business - www.ubizen.com
>


Mime
View raw message