ASF Bugzilla – Attachment 7172 Details for
Bug 15852
cache MUST attach Warning 113 to hits older than 24 hours
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
unified diff version of attachment 7152
td (text/plain), 1.93 KB, created by
Co-Advisor
on 2003-07-08 20:39:59 UTC
(
hide
)
Description:
unified diff version of attachment 7152
Filename:
MIME Type:
Creator:
Co-Advisor
Created:
2003-07-08 20:39:59 UTC
Size:
1.93 KB
patch
obsolete
>--- server/util_script.c Tue Jul 8 14:26:46 2003 >+++ server/util_script.c.7152 Tue Jul 8 14:28:40 2003 >@@ -591,6 +591,12 @@ > else if (!strcasecmp(w, "Transfer-Encoding")) { > apr_table_set(r->headers_out, w, l); > } >+ else if (!strcasecmp(w, "Age")) { >+ apr_table_set(r->headers_out, w, l); >+ } >+ else if (!strcasecmp(w, "Expires")) { >+ apr_table_set(r->headers_out, w, l); >+ } > /* > * If the script gave us a Last-Modified header, we can't just > * pass it on blindly because of restrictions on future values. >--- modules/experimental/cache_util.c Mon Feb 3 10:31:36 2003 >+++ modules/experimental/cache_util.c.7152 Tue Jul 8 14:34:40 2003 >@@ -164,6 +164,7 @@ > apr_int64_t age, maxage_req, maxage_cresp, maxage, smaxage, maxstale, minfresh; > const char *cc_cresp, *cc_req, *pragma_cresp; > const char *agestr = NULL; >+ const char *exps; > char *val; > apr_time_t age_c = 0; > cache_info *info = &(cache->handle->cache_obj->info); >@@ -208,6 +209,9 @@ > age_c = apr_atoi64(agestr); > } > >+ /* Extract "Expires" from the response header for determining Heuristic expiration condition */ >+ exps = apr_table_get(r->headers_out, "Expires"); >+ > /* calculate age of object */ > age = ap_cache_current_age(info, age_c, r->request_time); > >@@ -275,6 +279,18 @@ > /* make sure we don't stomp on a previous warning */ > apr_table_merge(r->headers_out, "Warning", "110 Response is stale"); > } >+ >+ /* >+ * If none of Expires, Cache-Control: max-age, or Cache-Control: >+ * s-maxage appears in the response, and the respose header age >+ * calculated is more than 24 hours add the warning 113 >+ */ >+ if((maxage_cresp == -1) && (smaxage == -1) && >+ (exps == NULL) && (age_c > 86400)) { >+ apr_table_merge(r->headers_out, "Warning", "113 Heuristic expiration"); >+ } >+ >+ > return 1; /* Cache object is fresh */ > } > return 0; /* Cache object is stale */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 15852
:
4349
|
7115
|
7116
|
7127
|
7130
|
7152
| 7172 |
7173
|
7174
|
7202
|
7434
|
7435