On 07/21/2011 01:34 PM, Konstantin Kolinko wrote:
2011/7/19<jfcl...@apache.org>:
Author: jfclere
Date: Tue Jul 19 08:06:46 2011
New Revision: 1148216
URL: http://svn.apache.org/viewvc?rev=1148216&view=rev
Log:
Fix for PR49595
Modified:
tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Tue Jul 19
08:06:46 2011
@@ -507,13 +507,13 @@ public class AjpAprProcessor extends Abs
long socketRef = socket.getSocket().longValue();
if (outputBuffer.position()> 0) {
- if (Socket.sendbb(socketRef, 0, outputBuffer.position())< 0) {
+ if ((socketRef != 0)&& Socket.sendbb(socketRef, 0,
outputBuffer.position())< 0) {
throw new IOException(sm.getString("ajpprocessor.failedsend"));
}
outputBuffer.clear();
1. Shouldn't socketRef eq 0 result in IOException as well here and in
the fragment below?
Probably.
2. I suspect that outputBuffer.clear() should be called even if
IOException is thrown.
Yep
Cheers
Jean-Frederic
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org