You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2003/05/14 00:41:46 UTC
cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java
remm 2003/05/13 15:41:46
Modified: http11/src/java/org/apache/coyote/http11
Http11Processor.java
Log:
- Robustness: catch exceptions which can occur in prepareRequest.
Revision Changes Path
1.64 +9 -2 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java
Index: Http11Processor.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- Http11Processor.java 23 Mar 2003 18:58:29 -0000 1.63
+++ Http11Processor.java 13 May 2003 22:41:46 -0000 1.64
@@ -608,7 +608,7 @@
error = true;
break;
} catch (Exception e) {
- log.warn("Error parsing HTTP request", e);
+ log.debug("Error parsing HTTP request", e);
// 500 - Bad Request
response.setStatus(400);
error = true;
@@ -617,7 +617,14 @@
// Setting up filters, and parse some request headers
thrA.setCurrentStage(threadPool, "prepareRequest");
rp.setStage(org.apache.coyote.Constants.STAGE_PREPARE);
- prepareRequest();
+ try {
+ prepareRequest();
+ } catch (Throwable t) {
+ log.debug("Error preparing request", t);
+ // 500 - Internal Server Error
+ response.setStatus(400);
+ error = true;
+ }
if (maxKeepAliveRequests > 0 && --keepAliveLeft == 0)
keepAlive = false;
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org