ASF Bugzilla – Attachment 22459 Details for
Bug 43826
Standards violation: POST does not invalidate the cache
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
let PUT POST DELETE invalidate the cache
patch (text/plain), 1.37 KB, created by
rahul
on 2008-08-20 05:06:36 UTC
(
hide
)
Description:
let PUT POST DELETE invalidate the cache
Filename:
MIME Type:
Creator:
rahul
Created:
2008-08-20 05:06:36 UTC
Size:
1.37 KB
patch
obsolete
>Index: modules/cache/mod_cache.c >=================================================================== >--- modules/cache/mod_cache.c (revision 687295) >+++ modules/cache/mod_cache.c (working copy) >@@ -57,11 +57,6 @@ > ap_filter_t *next; > ap_filter_rec_t *cache_out_handle; > >- /* Delay initialization until we know we are handling a GET */ >- if (r->method_number != M_GET) { >- return DECLINED; >- } >- > conf = (cache_server_conf *) ap_get_module_config(r->server->module_config, > &cache_module); > >@@ -110,6 +105,12 @@ > rv = cache_select(r); > if (rv != OK) { > if (rv == DECLINED) { >+ >+ /* We dont have a cache and we are not cacheble. */ >+ if (r->method_number != M_GET) { >+ return DECLINED; >+ } >+ > if (!lookup) { > > /* >@@ -167,6 +168,13 @@ > "file by %s cache", cache->provider_name); > } > return DECLINED; >+ } else { >+ /* We have a cache entry. Time to invalidate it if necessary */ >+ if ((r->method_number == M_POST) || (r->method_number == M_PUT) || >+ (r->method_number == M_DELETE)) { >+ cache_remove_url(cache, r->pool); >+ return DECLINED; >+ } > } > > /* if we are a lookup, we are exiting soon one way or another; Restore
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 43826
:
22459
|
22463
|
22467