Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 65144 invoked from network); 21 Jul 2006 10:07:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jul 2006 10:07:48 -0000 Received: (qmail 61785 invoked by uid 500); 21 Jul 2006 10:07:23 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 61574 invoked by uid 500); 21 Jul 2006 10:07:21 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 61526 invoked by uid 99); 21 Jul 2006 10:07:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 03:07:21 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [217.140.77.184] (HELO mail.schoenhaber.de) (217.140.77.184) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 03:07:19 -0700 Received: from localhost (unknown [127.0.0.1]) by mail.schoenhaber.de (Postfix) with ESMTP id 7F4F97057EF4 for ; Fri, 21 Jul 2006 10:06:57 +0000 (UTC) Received: from mail.schoenhaber.de ([127.0.0.1]) by localhost (mail.schoenhaber.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 23926-19 for ; Fri, 21 Jul 2006 12:06:52 +0200 (CEST) Received: from Gimli.schoenhaber.de (Gimli [192.168.42.6]) by mail.schoenhaber.de (Postfix) with ESMTP id E589C70561B8 for ; Fri, 21 Jul 2006 12:06:52 +0200 (CEST) From: Markus =?iso-8859-1?q?Sch=F6nhaber?= Reply-To: users@tomcat.apache.org To: "Tomcat Users List" Subject: Re: Removal of headers in HttpServletResponse object Date: Fri, 21 Jul 2006 12:06:52 +0200 User-Agent: KMail/1.9.1 References: <891AE1CD3C5FF345BF8B3542D8D054CD011B15A4@esealmw112.eemea.ericsson.se> In-Reply-To: <891AE1CD3C5FF345BF8B3542D8D054CD011B15A4@esealmw112.eemea.ericsson.se> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200607211206.52457.mailing-tomcat-user@schoenhaber.de> X-Virus-Scanned: amavisd-new at schoenhaber.de X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Geir =D8vsttun wrote: > I am still struggling with the removal of header problem. > > I found that the ServletResponse has a reset() method which should delete > all headers. I thought maybe I could use this and then reconstruct the > response object with only the headers I want. I tried to do call this > method in the http servlet code itself but when the object is returned > Tomcat reconstruct the original headers before sending the response to the > client. > > For this to work must the reset() method be called from a Filter or a Val= ve > ? AFAICT the HttpServletResponse object a Filter sees doesn't contain the Dat= e=20 and Server header fields. These seem to be added later in the response chai= n.=20 I therefore doubt a filter will help you. Maybe a valve will get the task=20 done, but since I've never worked with a homegrown Valve, I don't know. Regards mks --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org