Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1630

304 response causes multiple copies of file in cache

    XMLWordPrintableJSON

Details

    Description

      See the attached log of a GET with a 200 response followed by a GET to the same URL which receives a 304 response and a CacheResponseStatus of VALIDATED. Using a HttpClient initialized as in the other attachment, these two requests result in 2 identical files in the cache directory, not one.

      Additional info: This happens with multiple repeated requests that receive 304. Sometime however the file is served from the cache with no additional copy. See new http-sometimes.txt attachment for what that looks like.

      More info: Code work fine against various URLs that include Cache-Control, etc. in their response, but has the same multiple copy behavior against any response that includes only ETag and Last-Modified.

      Attachments

        1. cachedir.png
          27 kB
          Philip Boutros
        2. code.txt
          0.3 kB
          Philip Boutros
        3. http.txt
          4 kB
          Philip Boutros
        4. http-sometimes.txt
          1 kB
          Philip Boutros

        Activity

          People

            Unassigned Unassigned
            pboutros Philip Boutros
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: