I'd like to commit something along these lines to the
v4 and v5 CoyoteAdaptors:

--- coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java        16 Mar 2003 
01:56:27 -0000      1.13.2.3
+++ coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java        18 Sep 2003 
19:45:09 -0000
@@ -273,7 +273,13 @@

         // URI decoding
         req.decodedURI().duplicate(req.requestURI());
-        req.getURLDecoder().convert(req.decodedURI(), false);
+        try {
+          req.getURLDecoder().convert(req.decodedURI(), false);
+        } catch (IOException ioe) {
+            res.setStatus(400);
+            res.setMessage("Invalid URI");
+            throw new IOException("Invalid URI");
+        }
         req.decodedURI().setEncoding("UTF-8");

         // Normalize decoded URI

UDecoder.convert will throw a CharConversionException for
urls which contain '%' with invalid or no trailing hex digits.
This exception is ignored and Tomcat is returning a 200 with
an empty body, which is wrong.

Any suggestions on a better way to correct are welcome.

Keith


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to