Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4DF8811E63 for ; Fri, 16 May 2014 17:31:45 +0000 (UTC) Received: (qmail 55378 invoked by uid 500); 16 May 2014 11:46:12 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 61584 invoked by uid 500); 16 May 2014 11:31:56 -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 96509 invoked by uid 99); 16 May 2014 11:22:23 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 May 2014 11:22:23 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rob.elliot@ft.com designates 207.126.144.131 as permitted sender) Received: from [207.126.144.131] (HELO eu1sys200aog111.obsmtp.com) (207.126.144.131) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 15 May 2014 21:23:10 +0000 Received: from mail-qc0-f176.google.com ([209.85.216.176]) (using TLSv1) by eu1sys200aob111.postini.com ([207.126.147.11]) with SMTP ID DSNKU3UwJ/56G6iyf0FF9u9mlniHs28lG4CP@postini.com; Thu, 15 May 2014 21:22:47 UTC Received: by mail-qc0-f176.google.com with SMTP id r5so2872352qcx.35 for ; Thu, 15 May 2014 14:22:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=71+uI5TP4kkmlolfbN/vl0yTrYKOkXnfv8gEcrAXemM=; b=WKDG40mfMQB14LsSN87HWPwHwZxT2vP/kKX4jQFqWYukJ33oxB5b7iYToV3GtQOiT4 ibL5TiLwvWnzGMBHeEzNqR/9UUVRHf/ZpR6qqgoRGemJHhXpsX9sJjdK6f+Lxr6FSlpA DQ2jfOd4XaVj2v23CeNFAO/NoQOYCFeSOiepJJrOP7ezMY8bnpnIOpGa+ZRoD2XKd1tQ 5kE0cuJMwjQ5A/xX6nNJx9xBCPcg95n5c8VGruEKbfSIE2+7N0yRk1CnvbIWwuCrnAJ+ S2vnQ5cSKTiA8EttM1WWxaHvhd124hdFZnh/1Z8APPAJNzCegrDSOa1hg3Y7kqLlYXJy e+NA== X-Gm-Message-State: ALoCoQku7/7RN6n5E4no6ZSGn1QwNqGx6TTTEJH1iAWK8t91Rfn5yW2YYNLfO3ACQUUqrnBuotk/yygXhDUobyyhQ/pNRYWVQxzpPNYxcVnadwsApTCK/sG3ZSEEVKHD+nAdP/qt+Lg6 X-Received: by 10.224.47.130 with SMTP id n2mr17264038qaf.26.1400188966446; Thu, 15 May 2014 14:22:46 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.224.47.130 with SMTP id n2mr17264022qaf.26.1400188966327; Thu, 15 May 2014 14:22:46 -0700 (PDT) Received: by 10.229.223.134 with HTTP; Thu, 15 May 2014 14:22:46 -0700 (PDT) In-Reply-To: References: <1399968085.24439.7.camel@ubuntu> <1399980862.28534.9.camel@ubuntu> Date: Thu, 15 May 2014 22:22:46 +0100 Message-ID: Subject: Re: Caching responses to HEAD requests in httpclient-cache From: Rob Elliot To: HttpComponents Project Content-Type: multipart/alternative; boundary=001a1134b004f4ef4404f976e5b0 X-Virus-Checked: Checked by ClamAV on apache.org --001a1134b004f4ef4404f976e5b0 Content-Type: text/plain; charset=UTF-8 Sorry to be tardy replying. Thanks, Jon - hopefully we'll be able to have a crack at this soon. Rob On 13 May 2014 17:22, Jon Moore wrote: > Hi folks, > > I think extending the cache module to support caching HEAD would be very > welcome, and I think you've identified the overall constraints (cached HEAD > responses can satisfy HEAD requests but GET requests still require an > origin request). I think it would be also valuable to allow HEAD requests > to be satisfied from cached responses to previous GETs, but that can > certainly come as a second step if desired. > > A clean patch with good unit test coverage for this will almost certainly > get accepted in one form or another. One other constraint is that we try > very hard to maintain binary backwards-compatibility in the non-private > parts of HttpClient and its associated modules, so bear that in mind if you > find you need to do refactoring. In any event, the right way forward is to > open a JIRA issue, and as you run across issues we can discuss approaches > there. > > Thanks for your interest in making this contribution! > > Jon > > > > On Tue, May 13, 2014 at 7:34 AM, Oleg Kalnichevski > wrote: > > > On Tue, 2014-05-13 at 11:56 +0100, Rob Elliot wrote: > > > On 13 May 2014 09:01, Oleg Kalnichevski wrote: > > > > > > > > On Mon, 2014-05-12 at 13:48 +0100, Rob Elliot wrote: > > > > > > > > > > We're considering extending httpclient-cache to make [it cache the > > > responses > > > > > to HEAD requests], but we > > > > > don't want to lock ourselves out of upgrading forever. If we were > to > > do > > > so > > > > > and offer to contribute it back to the project would you be > > interested? > > > > > > > > > > Regards, > > > > > Rob > > > > > > > > > > > > > The best course of action would be to raise a JIRA with a change > > request > > > > and attach propose changes as a patch in udiff format. Alternatively > > you > > > > might want to fork httpclient in github [1] and open a pull request > > with > > > > the project. > > > > > > > > > > Thanks, Oleg. Can I take it from this that you would be receptive to > this > > > change? > > > It'd be good to know that, provided we implement it well, it would be > > > likely to be > > > accepted before we steam ahead and do it. > > > > > > Thanks, > > > Rob > > > > > > > Rob, > > > > I generally try to stay away from anything cache related. I hope Jon or > > Francois-Xavier can comment whether or not the proposed change is likely > > to get accepted. > > > > Generally, a well engineered patch that comes with a decent test > > coverage is likely to get incorporated in one way or another. Even _if_ > > the whole idea got rejected we could still try to make the caching > > module extensible in such a way as to enable you to plug in some > > non-standard custom code to archive the desired effect without having to > > fork the framework. > > > > Oleg > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org > > For additional commands, e-mail: dev-help@hc.apache.org > > > > > > > -- > ........ > Jon Moore > -- ------------------------------ This email was sent by a company owned by Pearson plc, registered office at 80 Strand, London WC2R 0RL. Registered in England and Wales with company number 53723. --001a1134b004f4ef4404f976e5b0--