tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1165247 - /tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
Date Mon, 05 Sep 2011 11:55:31 GMT
Author: markt
Date: Mon Sep  5 11:55:31 2011
New Revision: 1165247

URL: http://svn.apache.org/viewvc?rev=1165247&view=rev
Log:
Remove unnecessary try/catch
The methods it contained were either simple setters or already provided exactly the same exception
handling

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1165247&r1=1165246&r2=1165247&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Mon Sep  5 11:55:31 2011
@@ -283,24 +283,18 @@ public class Http11Processor extends Abs
             }
 
             // Finish the handling of the request
-            try {
-                rp.setStage(org.apache.coyote.Constants.STAGE_ENDINPUT);
-                // If we know we are closing the connection, don't drain input.
-                // This way uploading a 100GB file doesn't tie up the thread 
-                // if the servlet has rejected it.
-                
-                if(error && !isAsync())
-                    inputBuffer.setSwallowInput(false);
-                if (!isAsync())
-                    endRequest();
-            } catch (Throwable t) {
-                ExceptionUtils.handleThrowable(t);
-                log.error(sm.getString("http11processor.request.finish"), t);
-                // 500 - Internal Server Error
-                response.setStatus(500);
-                adapter.log(request, response, 0);
-                error = true;
+            rp.setStage(org.apache.coyote.Constants.STAGE_ENDINPUT);
+            
+            if(error && !isAsync()) {
+                // If we know we are closing the connection, don't drain
+                // input. This way uploading a 100GB file doesn't tie up the
+                // thread if the servlet has rejected it.
+                inputBuffer.setSwallowInput(false);
             }
+
+            if (!isAsync())
+                endRequest();
+
             try {
                 rp.setStage(org.apache.coyote.Constants.STAGE_ENDOUTPUT);
             } catch (Throwable t) {



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


Mime
View raw message