Lines 130-138
Link Here
|
130 |
const char *cc_cresp, *cc_ceresp, *cc_req; |
130 |
const char *cc_cresp, *cc_ceresp, *cc_req; |
131 |
const char *agestr = NULL; |
131 |
const char *agestr = NULL; |
132 |
const char *expstr = NULL; |
132 |
const char *expstr = NULL; |
|
|
133 |
const char *pragma; |
133 |
char *val; |
134 |
char *val; |
134 |
apr_time_t age_c = 0; |
135 |
apr_time_t age_c = 0; |
135 |
cache_info *info = &(h->cache_obj->info); |
136 |
cache_info *info = &(h->cache_obj->info); |
|
|
137 |
cache_server_conf *conf = |
138 |
(cache_server_conf *)ap_get_module_config(r->server->module_config, |
139 |
&cache_module); |
140 |
|
136 |
|
141 |
|
137 |
/* |
142 |
/* |
138 |
* We now want to check if our cached data is still fresh. This depends |
143 |
* We now want to check if our cached data is still fresh. This depends |
Lines 166-174
Link Here
|
166 |
* entity, and it's value is in the past, it has expired. |
171 |
* entity, and it's value is in the past, it has expired. |
167 |
* |
172 |
* |
168 |
*/ |
173 |
*/ |
|
|
174 |
|
175 |
/* This value comes from the client's initial request. */ |
176 |
cc_req = apr_table_get(r->headers_in, "Cache-Control"); |
177 |
pragma = apr_table_get(r->headers_in, "Pragma"); |
178 |
|
179 |
if (ap_cache_liststr(NULL, pragma, "no-cache", NULL) |
180 |
|| ap_cache_liststr(NULL, cc_req, "no-cache", NULL)) { |
181 |
|
182 |
if (!conf->ignorecachecontrol) { |
183 |
/* Treat as stale, causing revalidation */ |
184 |
return 0; |
185 |
} |
186 |
|
187 |
ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server, |
188 |
"Incoming request is asking for a uncached version of " |
189 |
"%s, but we know better and are ignoring it", |
190 |
r->unparsed_uri); |
191 |
} |
169 |
cc_cresp = apr_table_get(h->resp_hdrs, "Cache-Control"); |
192 |
cc_cresp = apr_table_get(h->resp_hdrs, "Cache-Control"); |
170 |
cc_ceresp = apr_table_get(h->resp_err_hdrs, "Cache-Control"); |
193 |
cc_ceresp = apr_table_get(h->resp_err_hdrs, "Cache-Control"); |
171 |
cc_req = apr_table_get(h->req_hdrs, "Cache-Control"); |
|
|
172 |
|
194 |
|
173 |
if ((agestr = apr_table_get(h->resp_hdrs, "Age"))) { |
195 |
if ((agestr = apr_table_get(h->resp_hdrs, "Age"))) { |
174 |
age_c = apr_atoi64(agestr); |
196 |
age_c = apr_atoi64(agestr); |