Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 9956 invoked from network); 12 Oct 2010 18:23:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Oct 2010 18:23:55 -0000 Received: (qmail 8900 invoked by uid 500); 12 Oct 2010 18:23:55 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 8841 invoked by uid 500); 12 Oct 2010 18:23:54 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 8833 invoked by uid 99); 12 Oct 2010 18:23:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 18:23:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Oct 2010 18:23:53 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9CINX4t027919 for ; Tue, 12 Oct 2010 18:23:33 GMT Message-ID: <11252182.100461286907813322.JavaMail.jira@thor> Date: Tue, 12 Oct 2010 14:23:33 -0400 (EDT) From: "Felix Berger (JIRA)" To: dev@hc.apache.org Subject: [jira] Created: (HTTPCLIENT-1010) add an X-From-Cache header to responses that are served from the cache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org