From users-return-229841-apmail-tomcat-users-archive=tomcat.apache.org@tomcat.apache.org Thu Dec 1 15:49:49 2011 Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F20017176 for ; Thu, 1 Dec 2011 15:49:48 +0000 (UTC) Received: (qmail 63987 invoked by uid 500); 1 Dec 2011 15:49:45 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 63925 invoked by uid 500); 1 Dec 2011 15:49:45 -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 63916 invoked by uid 99); 1 Dec 2011 15:49:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 15:49:45 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_FROM,HTML_FONT_FACE_BAD,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of martin.kuen@gmail.com designates 209.85.160.173 as permitted sender) Received: from [209.85.160.173] (HELO mail-gy0-f173.google.com) (209.85.160.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 15:49:37 +0000 Received: by ghbg19 with SMTP id g19so2464581ghb.18 for ; Thu, 01 Dec 2011 07:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Rv8VlMNYMxBthSB6XjldWvQJ3CkbmU/Kn67V/aE1y5g=; b=ZDfo+c4fMXWKozCzAT3IIp++DL+8yg4kLohZ3FfOPIsRjnEAH0M7mL7f1QEuojja29 v/hkLlfyc1b4B7JcyFFILDZZa3zXKjh5g58EXDmPsUzA3w/3RbHT241He9BsWWOlkOvO xYn6JZ/BM8RNF4uE7A5GNTpkPvNAkXLhxxK9Q= MIME-Version: 1.0 Received: by 10.236.78.74 with SMTP id f50mr12401274yhe.130.1322754554780; Thu, 01 Dec 2011 07:49:14 -0800 (PST) Received: by 10.236.63.169 with HTTP; Thu, 1 Dec 2011 07:49:14 -0800 (PST) In-Reply-To: References: Date: Thu, 1 Dec 2011 16:49:14 +0100 Message-ID: Subject: Re: Tomcat 7 + exception while adding cookies From: Martin Kuen To: Tomcat Users List Content-Type: multipart/alternative; boundary=20cf300fad3b5cdb5104b309cbb1 X-Virus-Checked: Checked by ClamAV on apache.org --20cf300fad3b5cdb5104b309cbb1 Content-Type: text/plain; charset=UTF-8 Hi Mallick, hi all, To me it appears this setting is ignored by tc 7.0.x. I created a servlet: protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.getSession().invalidate(); final int NUM_COOKIES = 500; for (int i = 0; i < NUM_COOKIES; i++) { Cookie c = new Cookie("foo" + i, UUID.randomUUID().toString()); response.addCookie(c); } response.setContentType("text/html"); response.getWriter().write( "

A ton of cookies

" ); System.out.println("sent " + NUM_COOKIES); } Accessing it causes the exception to be thrown. Whereas tc 6.0.33 behaviour is changed by increasing "maxHttpHeaderSize", 7.0.0, 7.0.14, 7.0.21 ignore the setting. i.e. for tc 6 setting maxHttpHeaderSize="8193" will cause OOB exception at index 8193. for tc 7 OOB always happens at 8192. I first blamed eclipse wtp doing sth. wrong when applying the configuration. Therefore, I checked the connector's jmx properties and to my surprise I could no longer find a property called "maxHttpHeaderSize" for the connector (comparing tc 6 to 7). Was it dropped by intention? I skimmed through the changelogs but couldn't find an explanation . . . Afaik as I know this is a configurable setting for (at least most) webservers Best Regards, Martin --20cf300fad3b5cdb5104b309cbb1--