remm 01/06/18 16:28:40
Modified: catalina/src/share/org/apache/catalina/connector/http
HttpProcessor.java
Log:
- Skip leftover bytes before closing the socket.
Revision Changes Path
1.28 +19 -4
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java
Index: HttpProcessor.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- HttpProcessor.java 2001/06/18 06:22:27 1.27
+++ HttpProcessor.java 2001/06/18 23:28:39 1.28
@@ -1,6 +1,6 @@
-/* * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
1.27 2001/06/18 06:22:27 remm Exp $
- * $Revision: 1.27 $
- * $Date: 2001/06/18 06:22:27 $
+/* * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
1.28 2001/06/18 23:28:39 remm Exp $
+ * $Revision: 1.28 $
+ * $Date: 2001/06/18 23:28:39 $
*
* ====================================================================
*
@@ -106,7 +106,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
- * @version $Revision: 1.27 $ $Date: 2001/06/18 06:22:27 $
+ * @version $Revision: 1.28 $ $Date: 2001/06/18 23:28:39 $
*/
final class HttpProcessor
@@ -935,12 +935,27 @@
}
try {
+ shutdownInput(input);
socket.close();
} catch (IOException e) {
;
}
socket = null;
+ }
+
+
+ protected void shutdownInput(InputStream input)
+ throws IOException {
+ try {
+ int available = input.available();
+ // skip any unread (bogus) bytes
+ if (available > 0) {
+ input.skip(available);
+ }
+ } catch (Exception e) {
+ ;
+ }
}