Author: markt
Date: Mon Sep 21 14:30:48 2015
New Revision: 1704304

URL: http://svn.apache.org/viewvc?rev=1704304&view=rev
Log:
Possible fix for 57265. A closed socket will no longer be available for sendFile

Modified:
    tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java

Modified: 
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java?rev=1704304&r1=1704303&r2=1704304&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java 
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java 
Mon Sep 21 14:30:48 2015
@@ -494,10 +494,10 @@ public class SecureNioChannel extends Ni
             int written = sc.write(src);
             return written;
         } else {
-            //make sure we can handle expand, and that we only use one buffer
-            if ( (!this.isSendFile()) && (src != bufHandler.getWriteBuffer()) 
) throw new 
IllegalArgumentException(sm.getString("channel.nio.ssl.invalidBuffer"));
             //are we closing or closed?
             if ( closing || closed) throw new 
IOException(sm.getString("channel.nio.ssl.closing"));
+            //make sure we can handle expand, and that we only use one buffer
+            if ( (!this.isSendFile()) && (src != bufHandler.getWriteBuffer()) 
) throw new 
IllegalArgumentException(sm.getString("channel.nio.ssl.invalidBuffer"));
 
             //the number of bytes written
             int written = 0;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to