File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11Changes with Apache 2.0.48
22
3+ *) mod_cache: Fix the cache code so that responses can be cached
4+ if they have an Expires header but no Etag or Last-Modified
5+ headers. PR 23130.
6+ [bjorn@exoweb.net]
7+
38 *) mod_log_config: Fix %b log format to write really "-" when 0 bytes
49 were sent (e.g. with 304 or 204 response codes). [Astrid Ke�ler]
510
Original file line number Diff line number Diff line change 11APACHE 2.0 STATUS: -*-text-*-
2- Last modified at [$Date: 2003/09/27 18:13:12 $]
2+ Last modified at [$Date: 2003/09/27 18:17:09 $]
33
44Release:
55
@@ -65,12 +65,6 @@ PATCHES TO PORT FROM 2.1
6565 [ please place file names and revisions from HEAD here, so it is easy to
6666 identify exactly what the proposed changes are! ]
6767
68- * The cache code should be able to cache a response if it has an
69- Expires header but no Etag or Last-Modified headers. This submitted
70- patch (by bjorn@exoweb.net) resolves PR 23130.
71- http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/experimental/mod_cache.c.diff?r1=1.76&r2=1.77
72- +1: rederpj, fielding, brianp
73-
7468 * Modifies the cache code to be header-location agnostic. Also
7569 fixes a number of other cache code bugs related to PR 15852
7670 (an RFC 2616 violation).
Original file line number Diff line number Diff line change @@ -540,14 +540,14 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in)
540540 reason = "HTTP Status 304 Not Modified" ;
541541 }
542542 else if (r -> status == HTTP_OK && lastmods == NULL && etag == NULL
543- && (conf -> no_last_mod_ignore == 0 )) {
544- /* 200 OK response from HTTP/1.0 and up without a Last-Modified
545- * header/ Etag
543+ && (exps == NULL ) && ( conf -> no_last_mod_ignore == 0 )) {
544+ /* 200 OK response from HTTP/1.0 and up without Last-Modified,
545+ * Etag, or Expires headers.
546546 */
547- /* XXX mod-include clears last_modified/expires/etags - this
547+ /* Note: mod-include clears last_modified/expires/etags - this
548548 * is why we have an optional function for a key-gen ;-)
549549 */
550- reason = "No Last-Modified or Etag header " ;
550+ reason = "No Last-Modified, Etag, or Expires headers " ;
551551 }
552552 else if (r -> header_only ) {
553553 /* HEAD requests */
@@ -723,7 +723,6 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in)
723723 info -> request_time = r -> request_time ;
724724
725725 /* check last-modified date */
726- /* XXX FIXME we're referencing date on a path where we didn't set it */
727726 if (lastmod != APR_DATE_BAD && lastmod > date ) {
728727 /* if it's in the future, then replace by date */
729728 lastmod = date ;
You can’t perform that action at this time.
0 commit comments