That's it! :-)

socketBuffer="-1" really fixed the issue.

thanks a lot,
Vitor

Remy Maucherat wrote:

Vitor Buitoni wrote:

Remy,

I also tried using a PrintWriter, and i got the same results. checkError() only returns true when about 8k of data are sent after the connection has been closed.


Yes, it's normal, since the normal stream will not throw an exception, the writer can't know about an error either.

You said that there was indeed something wrong... I'm using Tomcat 5.0.16 , do you know if this version has already been fixed?


No. I just fixed it, so 5.0.16 doesn't have the fix.

Well, after some tests, i think that i found the source of my problem. The method response.setBufferSize(), only allows me to set a buffer higher than 8192 bytes. If i try to set a lower value it just ignores it and keep the default of 8192. I confirmed this with:

response.setBufferSize(n);
System.out.println("BufferSize="+response.getBufferSize); // if n<8192 it aways prints 8192, otherwise print the value of n


The buffer allocated is at least as large as what you are requesting.

I still would like to know if there's any way (ugly or not, it doesn't matter how) to disable this buffering... So i can detect when the client closes the connection.


For now, use socketBuffer="-1" on the connector. That will likely fix the issue. Remember to remove it when you upgrade to the next release, as the connector is not as network efficient without that.


--



*Vitor Buitoni* /Programador - APC/

*D�GITRO TECNOLOGIA*
*E-mail:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
*Fone:* (0xx48) 281-7314 / (0xx48) 281-7000
*Fax:* (0xx48) 281-7000
*Site:* www.portaldigitro.com.br <http://www.portaldigitro.com.br>


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to