From: Bill B. <bb...@re...> - 2014-04-17 21:17:40
|
You got a test that reproduces this? On 4/15/2014 12:43 PM, Mark Petrovic wrote: > Good day. > > I am studying HTTP caching, and I have been helped a great deal by > a close reading of the Resteasy CacheInterceptor client filter > example: > > https://github.com/resteasy/Resteasy/blob/master/jaxrs/resteasy-client/src/main/java/org/jboss/resteasy/client/jaxrs/cache/CacheInterceptor.java > > I am still learning and could easily be missing something. But it > seems to me that if > > 1) the client sets an If-None-Match header with an Etag value > > and > > 2) there is no local cache entry whatsoever, expired or not, as > determined in the ClientRequestFilter implementation > > and > > 3) the server returns 304 by virtue of the If-None-Match header > > then the ClientResponseFilter implementation will try to fetch a > response from cache when it is already determined that there is no > such entry. Consequently, the client is left with no usable response > available from cache or from the origin server. > > If I am correct, then if there is no cache entry as determined in > the ClientRequestFilter implementation, is it appropriate to remove > any If-None-Match -type headers before the request is sent? > > Thank you for your time as I try to understand this. > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |