*** cache_util.c	Mon Feb 17 06:12:42 2003
--- ../../../httpd-2.0.47-dev.modif/modules/experimental/cache_util.c	Thu Jun 12 12:46:00 2003
***************
*** 183,189 ****
       * entity, and it's value is in the past, it has expired.
       * 
       */
!     cc_cresp = apr_table_get(r->headers_out, "Cache-Control");
      cc_req = apr_table_get(r->headers_in, "Cache-Control");
      /* TODO: pragma_cresp not being used? */
      pragma_cresp = apr_table_get(r->headers_out, "Pragma");  
--- 183,189 ----
       * entity, and it's value is in the past, it has expired.
       * 
       */
!     cc_cresp = apr_table_get(r->err_headers_out, "Cache-Control");
      cc_req = apr_table_get(r->headers_in, "Cache-Control");
      /* TODO: pragma_cresp not being used? */
      pragma_cresp = apr_table_get(r->headers_out, "Pragma");  
***************
*** 259,276 ****
          maxstale = 0;
      }
      /* handle expiration */
!     if ((-1 < smaxage && age < (smaxage - minfresh)) ||
!         (-1 < maxage && age < (maxage + maxstale - minfresh)) ||
          (info->expire != APR_DATE_BAD &&
!          age < (apr_time_sec(info->expire - info->date) + maxstale - minfresh))) {
          /* it's fresh darlings... */
          /* set age header on response */
          apr_table_set(r->headers_out, "Age",
                        apr_psprintf(r->pool, "%lu", (unsigned long)age));
  
          /* add warning if maxstale overrode freshness calculation */
!         if (!((-1 < smaxage && age < smaxage) ||
!               (-1 < maxage && age < maxage) ||
                (info->expire != APR_DATE_BAD &&
                 (info->expire - info->date) > age))) {
              /* make sure we don't stomp on a previous warning */
--- 259,276 ----
          maxstale = 0;
      }
      /* handle expiration */
!     if ((-1 == smaxage || age < (smaxage - minfresh)) &&
!         (-1 == maxage || age < (maxage + maxstale - minfresh)) &&
          (info->expire != APR_DATE_BAD &&
!          age < (apr_time_sec(info->expire - info->date) + maxstale - minfresh))) { 
          /* it's fresh darlings... */
          /* set age header on response */
          apr_table_set(r->headers_out, "Age",
                        apr_psprintf(r->pool, "%lu", (unsigned long)age));
  
          /* add warning if maxstale overrode freshness calculation */
!         if (!((-1 == smaxage || age < smaxage) &&
!               (-1 == maxage || age < maxage) &&
                (info->expire != APR_DATE_BAD &&
                 (info->expire - info->date) > age))) {
              /* make sure we don't stomp on a previous warning */
