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 3D69A10641 for ; Wed, 13 Nov 2013 12:25:13 +0000 (UTC) Received: (qmail 66617 invoked by uid 500); 13 Nov 2013 12:24:49 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 66442 invoked by uid 500); 13 Nov 2013 12:24:38 -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 66073 invoked by uid 99); 13 Nov 2013 12:24:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 12:24:31 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 12:24:25 +0000 Received: from [10.144.173.12] (unknown [89.204.138.12]) (Authenticated sender: andre.warnier@ice-sa.com) by tor.combios.es (Postfix) with ESMTPA id 23F783C081F for ; Wed, 13 Nov 2013 13:24:19 +0100 (CET) Message-ID: <52836F51.40407@ice-sa.com> Date: Wed, 13 Nov 2013 13:23:45 +0100 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: FormAuthenticator: saveRequest does not preserve body References: <376EB12F2801D34AB4ACC4D79B52322301E43719@vmex1.saxsys.de> In-Reply-To: <376EB12F2801D34AB4ACC4D79B52322301E43719@vmex1.saxsys.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Bley, Stefan wrote: > We are using Picketlink 2.5.2.Final for Federated Identity Management within Tomcat 7.0.42. When the user invokes a request without being authenticated the FormAuthenticator will save the request into the session, issue the authentication request and then restore the original request. > However, the saveRequest method in FormAuthenticator does not save the request body. Debugging into Tomcat we found out that the while loop which writes the body is stepped over because is.read() returns -1. > > InputStream is = request.getInputStream(); > > while ( (bytesRead = is.read(buffer) ) >= 0) { > body.append(buffer, 0, bytesRead); > } > > Can anybody give a hint why the request inputstream can't be read? > Thank you! > Not without knowing what the request is/was. Was there a body ? What kind of request was it ? --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org