tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: Problem with POST to servlet: 16384 bytes maximum?
Date Thu, 07 Aug 2008 20:10:15 GMT
John.C.Cartwright@noaa.gov schrieb:
> I've had similar problems in various versions of tomcat.  Currently the
> problem seems to exist in 6.0.16 but not in 6.0.14 nor 5.5.17.  There
> was a bug filed, but I don't have the reference handy.

That was 44494.

But 44494 has an 8KB limit and also it's very unlikely that it already 
was in 4.1.29 (I would say it's not in there, but I din't check 
explicitely), so it doesn't look like it applies to this problem.

Regards,

Rainer

> --john
> 
> ----- Original Message -----
> From: Michele Fuortes <mfuortes@med.cornell.edu>
> Date: Thursday, August 7, 2008 12:18 pm
> Subject: Problem with POST to servlet: 16384 bytes maximum?
> 
>> Hi,
>>
>> I have a problem with POSTing an XML file to a servlet which writes 
>>
>> the XML to disk. If the XML file is less than 16384 bytes all goes  
>> well. If it's bigger the first 16384 bytes are written correctly, 
>> the  
>> rest all all 00s. The lenght of the file is the correct one as in 
>> the  
>> Content-Length: http header.
>>
>> The servlet is very simple (I did not write it), the relevant parts 
>> are:
>>        	File file;
>>        	FileOutputStream out2;
>>        	DataOutputStream out3;
>> ......
>>        	file = new File(req.getRealPath(filePath));
>>        	out2 = new FileOutputStream(file);
>>        	out3 = new DataOutputStream(out2);
>> ......
>>        	bytesAvailable=req.getContentLength();
>>        	byte[] theBytes=new byte[bytesAvailable];
>>        	in.read(theBytes);
>>        	out3.write(theBytes,0,bytesAvailable);
>>        	out3.flush();
>> ....
>>
>> Can anyone help? Is there a buffer limit somewhere that I have to  
>> change.
>> I'm using Apache 2.063/Tomcat/4.1.29-LE-jdk14 on MacOS 10.5.3
>>
>> Thanks
>>
>> Michele Fuortes
>>
>>
>> --
>> Michele Fuortes, M.D., Ph.D.
>> Assistant Professor
>> Department of Cell and Developmental Biology
>> Cornell University  - Weill Medical College
>> E-mail: mfuortes@med.cornell.edu

---------------------------------------------------------------------
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


Mime
View raw message