Skip to content

Commit c441131

Browse files
author
Bill Stoddard
committed
Do not cache responses to GET requests with query
URLs if the origin server does not explicitly provide an Expires header on the response (RFC 2616 Section 13.9) Submitted by: Kris Verbeeck <krisv@be.ubizen.com> Reviewed by: Bill Stoddard git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96772 13f79535-47bb-0310-9956-ffa450edef68
1 parent d3029b0 commit c441131

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
Changes with Apache 2.0.41
2+
*) mod_cache: Do not cache responses to GET requests with query
3+
URLs if the origin server does not explicitly provide an
4+
Expires header on the response (RFC 2616 Section 13.9)
5+
[Kris Verbeeck krisv@be.ubizen.com]
26

37
*) Fix memory leak in core_output_filter. [Justin Erenkrantz]
48

modules/experimental/mod_cache.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,10 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in)
538538
&& r->status != HTTP_NOT_MODIFIED)
539539
/* if a broken Expires header is present, don't cache it */
540540
|| (exps != NULL && exp == APR_DATE_BAD)
541+
/* if query string present but no expiration time, don't cache it
542+
* (RFC 2616/13.9)
543+
*/
544+
|| (r->args && exps == NULL)
541545
/* if the server said 304 Not Modified but we have no cache
542546
* file - pass this untouched to the user agent, it's not for us.
543547
*/

0 commit comments

Comments
 (0)