]> granicus.if.org Git - apache/commitdiff
attempt to fix some issues in mod_cache found by gcc
authorJeff Trawick <trawick@apache.org>
Fri, 7 Sep 2001 13:54:25 +0000 (13:54 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 7 Sep 2001 13:54:25 +0000 (13:54 +0000)
(use of rv and date before setting them)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90953 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/mod_cache.c

index d611b69e8ab92e8a747eb188cebca139cdd8fe36..f3af323f91472ac63634387f58f3572730775c28 100644 (file)
@@ -540,6 +540,11 @@ int ap_cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in)
         /* update headers */
 
         /* remove this filter ??? */
+
+        /* XXX is this right?  we must set rv to something other than OK 
+         * in this path
+         */
+        rv = HTTP_NOT_MODIFIED;
     }
     /* pre-existing cache handle and new entity, replace entity with this one */
     else {
@@ -584,8 +589,8 @@ int ap_cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in)
         ap_table_set(r->headers_out, "Date", dates);
         ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server,
                      "cache: Added date header");
+        info->date = date;
     }
-    info->date = date;
 
     /* set response_time for HTTP/1.1 age calculations */
     info->response_time = now;