Hi all,

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.

You can find example logs along with a mini app to demonstrate the issue at 
https://github.com/gesellix/httpclient-cache-demo.
I have already prepared a simple fix (based on httpclient-cache 4.5.5) at 
https://github.com/gesellix/httpcomponents-client/tree/disable-cache-for-null-resource.

My questions are:
1) did I miss some detail or use the cache library in a wrong way?
2) would the proposed fix be a good candidate for a pull request?

Thanks!
Tobias


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Reply via email to