• Patch
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • ehcache-web
  • nrana
  • Reporter: cbang
  • December 16, 2009
  • 0
  • Watchers: 0
  • April 14, 2010
  • March 16, 2010

Attachments

Description

SimpleCachingHeadersPageCachingFilter and SimplePageCachingFilter are both subject to body/entity disregards/short-circuits of anything but HTTP status codes sent from filters lower down the chain. This causes problems for RESTful services (I.e. Jersey/JSR-311) which relies on HTTP 3xx as well as 4xx response codes along with an associated entity/body for human troubleshooting and potentially machine consumption.

I am not sure about the motivation behind the currently observed short-cutting behavior, but this does not appear to be mandated behavior by RFC 2616 [http://www.w3.org/Protocols/rfc2616/rfc2616.html]. So I think the current behavior is wrong and does not play well with REST principles. Patch submitted.

Comments

Fiona OShea 2009-12-16

Greg, passing over to you for review.

Ludovic Orban 2010-03-16

Fixed, but please keep in mind that the default CachingFilter implementation is to only cache when the HTTP status code is 200.

Now when a request is made which returns something else than HTTP 200, the payload is not truncated anymore but still not cached.