tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1528432 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/upgrade/AprServletInputStream.java java/org/apache/coyote/http11/upgrade/LocalStrings.properties
Date Wed, 02 Oct 2013 11:29:17 GMT
Author: markt
Date: Wed Oct  2 11:29:16 2013
New Revision: 1528432

URL: http://svn.apache.org/r1528432
Log:
Handle Windows specific error code for connection abort

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
    tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1528424

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java?rev=1528432&r1=1528431&r2=1528432&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/AprServletInputStream.java
Wed Oct  2 11:29:16 2013
@@ -16,10 +16,12 @@
  */
 package org.apache.coyote.http11.upgrade;
 
+import java.io.EOFException;
 import java.io.IOException;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
 
+import org.apache.tomcat.jni.OS;
 import org.apache.tomcat.jni.Socket;
 import org.apache.tomcat.jni.Status;
 import org.apache.tomcat.util.net.SocketWrapper;
@@ -92,6 +94,10 @@ public class AprServletInputStream exten
         } else if (-result == Status.EAGAIN) {
             eagain = true;
             return 0;
+        } else if ((OS.IS_WIN32 || OS.IS_WIN64) &&
+                (-result == Status.APR_OS_START_SYSERR + 10053)) {
+            // 10053 on Windows is connection aborted
+            throw new EOFException(sm.getString("apr.clientAbort"));
         } else {
             throw new IOException(sm.getString("apr.read.error",
                     Integer.valueOf(-result)));

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties?rev=1528432&r1=1528431&r2=1528432&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/LocalStrings.properties Wed
Oct  2 11:29:16 2013
@@ -24,6 +24,7 @@ upgrade.sos.canWrite.ise=It is illegal t
 upgrade.sos.writeListener.null=It is illegal to pass null to setWriteListener()
 upgrade.sis.write.ise=It is illegal to call any of the write() methods in non-blocking mode
without first checking that there is space available by calling isReady()
 
+apr.clientAbort=The client aborted the connection.
 apr.read.error=Unexpected error [{0}] reading data from the APR/native socket.
 apr.write.error=Unexpected error [{0}] writing data to the APR/native socket.
 apr.closed=The socket associated with this connection has been closed.



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


Mime
View raw message