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

Cached HEAD requests without response body

    XMLWordPrintableJSON

    Details

      Description

      Since httpclient-cache 4.4 HEAD requests can be cached with a null response body. Subsequent GET requests to the same target then use the headers "If-None-Match" and "If-Modified-Since" to leverage caching via HTTP protocol. In that case a server can respond with status code 304 and an empty response body, which leads to an invalid cache entry.

      The GitHub PR #101 proposes a fix, which I have tested locally. The PR is based on httpclient-cache 4.5, but should easily be backported to 4.4. I haven't looked into the upcoming 5.x sources, yet.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                gesellix Tobias Gesellchen
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: