add an X-From-Cache header to responses that are served from the cache
----------------------------------------------------------------------
Key: HTTPCLIENT-1010
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1010
Project: HttpComponents HttpClient
Issue Type: New Feature
Components: Cache
Affects Versions: 4.1 Alpha2
Reporter: Felix Berger
Attachments: x-from-cache.patch
This allows the caller to find out if an actual connection has been made. One
possible way of doing this is to add a custom header to resonses generated from
the cache. The attached patch adds the header:
X-From-Cache: true
The use case where this is needed is when you want to know whether you are
actually connected to the internet or whether contacted server is alive without
generating extra out of order requests.
I was also looking if it was possible to detect this by looking at the Via
header, but it looks like the same header is added whether the response is
served from the backend or the local cache.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]