switch ((rv = list->provider->open_entity(h, r, cache->key))) {
case OK: {
char *vary = NULL;
- int fresh;
+ int fresh, mismatch = 0;
if (list->provider->recall_headers(h, r) != APR_SUCCESS) {
- /* TODO: Handle this error */
- return DECLINED;
+ /* try again with next cache type */
+ list = list->next;
+ continue;
}
/*
ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,
r->server,
"cache_select_url(): Vary header mismatch.");
- return DECLINED;
+ mismatch = 1;
}
}
+ /* no vary match, try next provider */
+ if (mismatch) {
+ /* try again with next cache type */
+ list = list->next;
+ continue;
+ }
+
cache->provider = list->provider;
cache->provider_name = list->provider_name;
lastmod);
}
cache->stale_handle = h;
+
+ /* ready to revalidate, pretend we were never here */
+ return DECLINED;
}
else {
int irv;
ap_log_error(APLOG_MARK, APLOG_DEBUG, irv, r->server,
"cache: attempt to remove url from cache unsuccessful.");
}
+
+ /* try again with next cache type */
+ list = list->next;
+ continue;
}
- return DECLINED;
}
/* Okay, this response looks okay. Merge in our stuff and go. */