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 C6C3E914F for ; Tue, 1 Nov 2011 02:00:22 +0000 (UTC) Received: (qmail 69472 invoked by uid 500); 1 Nov 2011 02:00:18 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 69358 invoked by uid 500); 1 Nov 2011 02:00:18 -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 69349 invoked by uid 99); 1 Nov 2011 02:00:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 02:00:18 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [216.32.181.182] (HELO ch1outboundpool.messaging.microsoft.com) (216.32.181.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 02:00:09 +0000 Received: from mail110-ch1-R.bigfish.com (10.43.68.241) by CH1EHSOBE006.bigfish.com (10.43.70.56) with Microsoft SMTP Server id 14.1.225.22; Tue, 1 Nov 2011 01:59:35 +0000 Received: from mail110-ch1 (localhost.localdomain [127.0.0.1]) by mail110-ch1-R.bigfish.com (Postfix) with ESMTP id 4F5DDE280CD for ; Tue, 1 Nov 2011 01:59:42 +0000 (UTC) X-SpamScore: -28 X-BigFish: VPS-28(zzbb2dK9371Kc89bh62a3K1447M542M1432N98dKzz1202hzz8275ch8275bh8275dhz2dh2a8h668h839h) X-Forefront-Antispam-Report: CIP:207.46.62.153;KIP:(null);UIP:(null);IPVD:NLI;H:SG1RD3HUB026.red003.local;RD:smtp601.mail.apac.microsoftonline.com;EFVD:NLI Received: from mail110-ch1 (localhost.localdomain [127.0.0.1]) by mail110-ch1 (MessageSwitch) id 1320112779960475_18971; Tue, 1 Nov 2011 01:59:39 +0000 (UTC) Received: from CH1EHSMHS025.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.253]) by mail110-ch1.bigfish.com (Postfix) with ESMTP id DB551878051 for ; Tue, 1 Nov 2011 01:59:39 +0000 (UTC) Received: from SG1RD3HUB026.red003.local (207.46.62.153) by CH1EHSMHS025.bigfish.com (10.43.70.25) with Microsoft SMTP Server (TLS) id 14.1.225.22; Tue, 1 Nov 2011 01:59:43 +0000 Received: from SG1RD3XVS451.red003.local ([10.112.166.181]) by SG1RD3HUB026.red003.local ([10.112.172.79]) with mapi; Mon, 31 Oct 2011 18:59:01 -0700 From: Anantaneni Harish To: Tomcat Users List Date: Mon, 31 Oct 2011 18:58:55 -0700 Subject: RE: cannot read complete HTTP request body. It reads only 8192 characters Thread-Topic: cannot read complete HTTP request body. It reads only 8192 characters Thread-Index: AcyYObI3aTwpC1g0S1mhFSzII2DJ0gAAAhbA Message-ID: <76A7159F4F167A4680050E6A2B1DB0C1098994B6@SG1RD3XVS451.red003.local> References: <76A7159F4F167A4680050E6A2B1DB0C10989907B@SG1RD3XVS451.red003.local> <3451529724817954742@unknownmsgid> <76A7159F4F167A4680050E6A2B1DB0C109899134@SG1RD3XVS451.red003.local> <4EA91BB0.9060707@kippdata.de> <76A7159F4F167A4680050E6A2B1DB0C109899173@SG1RD3XVS451.red003.local> <4EA97B09.5040407@christopherschultz.net> <4EAA9B1B.2040605@ice-sa.com> <76A7159F4F167A4680050E6A2B1DB0C1098994B0@SG1RD3XVS451.red003.local> <76A7159F4F167A4680050E6A2B1DB0C1098994B2@SG1RD3XVS451.red003.local> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: Arcc Bc78 CD8e CVbN CzCh C1gG DrOh EViZ EwSa FkjR GSbZ G3E4 HTrC HWBf I9Tt KOI9;1;dQBzAGUAcgBzAEAAdABvAG0AYwBhAHQALgBhAHAAYQBjAGgAZQAuAG8AcgBnAA==;Sosha1_v1;7;{AC2F0126-0BD1-4801-B1D0-BF7A09644B0D};YQBuAGEAbgB0AGEAbgBlAG4AaQAuAGgAYQByAGkAcwBoAEAAdgBlAHIAdABlAHgAcwBvAGYAdAAuAGMAbwBtAA==;Tue, 01 Nov 2011 01:58:55 GMT;UgBFADoAIABjAGEAbgBuAG8AdAAgAHIAZQBhAGQAIABjAG8AbQBwAGwAZQB0AGUAIABIAFQAVABQACAAcgBlAHEAdQBlAHMAdAAgAGIAbwBkAHkALgAgAEkAdAAgAHIAZQBhAGQAcwAgAG8AbgBsAHkAIAA4ADEAOQAyACAAYwBoAGEAcgBhAGMAdABlAHIAcwA= x-cr-puzzleid: {AC2F0126-0BD1-4801-B1D0-BF7A09644B0D} acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: vertexsoft.com Dont know :(, must be different.=20 Thanks and Regards, Harish -----Original Message----- From: Igor Cicimov [mailto:icicimov@gmail.com]=20 Sent: Tuesday, November 01, 2011 10:57 AM To: Tomcat Users List Subject: RE: cannot read complete HTTP request body. It reads only 8192 cha= racters And same kernel network settings? On Nov 1, 2011 12:50 PM, "Anantaneni Harish" < anantaneni.harish@vertexsoft.com> wrote: > Both environments have the following softwares. > > OS Name Red Hat Enterprise Linux > Version release 5.3 (Tikanga) > Java Name Java(TM) SE Runtime Environment (build 1.6.0_13-b03) > Version 1.6.0_13 > Tomcat Name apache-tomcat > Version 5.5.28 > > Thanks and Regards, > Harish > -----Original Message----- > From: Igor Cicimov [mailto:icicimov@gmail.com] > Sent: Tuesday, November 01, 2011 10:47 AM > To: Tomcat Users List > Subject: Re: cannot read complete HTTP request body. It reads only 8192 > characters > > You never said what is the difference between your environment and the > customer one or I missed that info. Same OS? Same Java version? > > On Tue, Nov 1, 2011 at 12:42 PM, Anantaneni Harish < > anantaneni.harish@vertexsoft.com> wrote: > > > > > Any thoughts about this? > > > > Thanks and Regards, > > Harish > > -----Original Message----- > > From: Anantaneni Harish > > Sent: Monday, October 31, 2011 11:23 AM > > To: Tomcat Users List > > Subject: RE: cannot read complete HTTP request body. It reads only 8192 > > characters > > > > String keyValuePair =3D null; > > String[] arrKeyValue =3D null; > > BufferedReader in =3D request.getReader(); > > while ((keyValuePair =3D in.readLine()) !=3D null) { > > arrKeyValue =3D keyValuePair.split("=3D"); > > > > Above code reads incomplete data(read only 8192 bytes) at my customer's > > environment, but reads complete data in my environment. > > > > String keyValuePair =3D null; > > String[] arrKeyValue =3D null; > > BufferedReader in =3D new BufferedReader(new > > InputStreamReader(request.getInputStream())); > > while ((keyValuePair =3D in.readLine()) !=3D null) { > > arrKeyValue =3D keyValuePair.split("=3D"); > > > > Above code reads complete data in both the environments. *no changes do= ne > > to customer's environment. > > > > I hope you can help me now by finding the reason for data lost at my > > customer's environment when using request.getReader(). > > > > Thanks and Regards, > > Harish > > > > -----Original Message----- > > From: Andr=E9 Warnier [mailto:aw@ice-sa.com] > > Sent: Friday, October 28, 2011 9:08 PM > > To: Tomcat Users List > > Subject: Re: cannot read complete HTTP request body. It reads only 8192 > > characters > > > > Konstantin Kolinko wrote: > > > 2011/10/27 Christopher Schultz : > > >> On 10/27/2011 4:58 AM, Anantaneni Harish wrote: > > >>> Thanks for the directions the Rainer. Actually the issue is just > > >>> solved. > > >>> > > >>> We have changed from BufferedReader in =3D request.getReader(); > > >>> > > >>> to > > >>> > > >>> BufferedReader in =3D new BufferedReader(new > > >>> InputStreamReader(request.getInputStream())); > > >>> > > >>> Now whole body has been read at my client's environment as well. > > >>> > > >>> But would like to know, what causes the issue. Do you have any > > >>> idea, why same method can read whole data in my environment and > > >>> does not read whole data at my customer's environment? > > >> You'll have to provide more information, such as the code you are > > >> using. > > >> > > >> I'm fairly sure Tomcat is not the source of the problem. > > >> > > > > > > +1. > > > > > > I think you need to pay more attention on the documentation of the > > > java.io.Reader#read() method, or maybe look for a tutorial. > > > > > > See also documentation for java.io.InputStream#available(). > > > > > > In short: the read() method returns a portion of data that is > > > currently available. If you need more data you must call read() > > > repeatedly in a loop until it returns -1. > > > > > > > .. and the difference between two systems, may be that on one system, t= he > > network is > > faster (or the system slower, or the buffer bigger) and so by the time > you > > do the read, > > there are more bytes available in the buffer. > > > > > If you had provided some of your source code that performs reading, w= e > > > would be able to point at the exact error in your code. > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > > For additional commands, e-mail: users-help@tomcat.apache.org > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > > For additional commands, e-mail: users-help@tomcat.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org