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 C4119105F8 for ; Wed, 13 Nov 2013 12:19:20 +0000 (UTC) Received: (qmail 56698 invoked by uid 500); 13 Nov 2013 12:19:15 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 56315 invoked by uid 500); 13 Nov 2013 12:19:12 -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 56302 invoked by uid 99); 13 Nov 2013 12:19:11 -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:19:11 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of stefan.bley@saxsys.de designates 194.180.239.5 as permitted sender) Received: from [194.180.239.5] (HELO mail.saxsys.de) (194.180.239.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 12:19:05 +0000 Received: from VMEX1.saxsys.de ([192.168.55.177]) by vmex2.saxsys.de ([192.168.5.2]) with mapi id 14.02.0342.003; Wed, 13 Nov 2013 13:18:43 +0100 From: "Bley, Stefan" To: "users@tomcat.apache.org" Subject: FormAuthenticator: saveRequest does not preserve body Thread-Topic: FormAuthenticator: saveRequest does not preserve body Thread-Index: Ac7gaUSiTvXDujQrQ/eb3of1G5IA7Q== Date: Wed, 13 Nov 2013 12:18:42 +0000 Message-ID: <376EB12F2801D34AB4ACC4D79B52322301E43719@vmex1.saxsys.de> Accept-Language: en-GB, de-DE, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [194.113.160.69] Content-Type: multipart/alternative; boundary="_000_376EB12F2801D34AB4ACC4D79B52322301E43719vmex1saxsysde_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_376EB12F2801D34AB4ACC4D79B52322301E43719vmex1saxsysde_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable We are using Picketlink 2.5.2.Final for Federated Identity Management withi= n Tomcat 7.0.42. When the user invokes a request without being authenticate= d the FormAuthenticator will save the request into the session, issue the a= uthentication request and then restore the original request. However, the saveRequest method in FormAuthenticator does not save the requ= est body. Debugging into Tomcat we found out that the while loop which writ= es the body is stepped over because is.read() returns -1. InputStream is =3D request.getInputStream(); while ( (bytesRead =3D is.read(buffer) ) >=3D 0) { body.append(buffer, 0, bytesRead); } Can anybody give a hint why the request inputstream can't be read? Thank you! Stefan Tomcat 7.0.42 Picketlink 2.5.2.Final Java 1.6.0_26 SuSE Linux 12 --_000_376EB12F2801D34AB4ACC4D79B52322301E43719vmex1saxsysde_--