hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Berger (JIRA)" <j...@apache.org>
Subject [jira] Created: (HTTPCLIENT-1010) add an X-From-Cache header to responses that are served from the cache
Date Tue, 12 Oct 2010 18:23:33 GMT
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

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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message