Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1346

DefaultRequestPipeline will cache (and serve) 304 responses

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.1, 2.0.0-RC2
    • 2.0.0-RC2
    • Java
    • None

    Description

      Currently in our product we are making use of DefaultRequestPipeline in our own code (to reuse the OAuth stores and make authenticated requests). Some of this code adds an If-Modified-Since header to a HttpRequest, and passes it into the RequestPipeline. If the response is not already in the cache and the server returns a 304, this is being added to the HttpCache, causing subsequent requests to return a 304 as well.

      This is catching us out where we have custom code that periodically fetches RSS feeds, because the 304 is being cached and then returned for contentType=FEED makeRequests by gadgets, which can't be parsed by Rome and is propagating empty objects to the gadgets themselves. At the moment, I'm not sure if this is something that necessarily needs to be fixed in Shindig (we are getting around this by injecting a wrapping implementation of HttpCache that doesn't cache 3xx responses) but if any Shindig code ever starts using this header, or this header is exposed to gadgets, it could cause issues.

      Attachments

        1. fix-1346-bug.patch
          2 kB
          Pradnya Karbhari

        Activity

          People

            pradnya Pradnya Karbhari
            mmannion Mathew Mannion
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: