Author: markt
Date: Sun Nov 19 16:10:03 2006
New Revision: 476988

URL: http://svn.apache.org/viewvc?view=rev&rev=476988
Log:
Port fix bug 40860. Additional logging if parameter processing fails.

Modified:
    
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/LocalStrings.properties
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/LocalStrings.properties?view=diff&rev=476988&r1=476987&r2=476988
==============================================================================
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/LocalStrings.properties 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/LocalStrings.properties 
Sun Nov 19 16:10:03 2006
@@ -46,6 +46,7 @@
 coyoteRequest.listenerStart=Exception sending context initialized event to 
listener instance of class {0}
 coyoteRequest.listenerStop=Exception sending context destroyed event to 
listener instance of class {0}
 coyoteRequest.attributeEvent=Exception thrown by attributes event listener
+coyoteRequest.parseParameters=Exception thrown whilst processing POSTed 
parameters
 coyoteRequest.postTooLarge=Parameters were not parsed because the size of the 
posted data was too big. Use the maxPostSize attribute of the connector to 
resolve this if the application should accept large POSTs.
 requestFacade.nullRequest=Null request object
 responseFacade.nullResponse=Null response object

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java?view=diff&rev=476988&r1=476987&r2=476988
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java Sun 
Nov 19 16:10:03 2006
@@ -2444,7 +2444,8 @@
                     parameters.processParameters(formData, 0, len);
                 }
             } catch (Throwable t) {
-                ; // Ignore
+                context.getLogger().warn(
+                        sm.getString("coyoteRequest.parseParameters"), t);
             }
         }
 

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java?view=diff&rev=476988&r1=476987&r2=476988
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java Sun 
Nov 19 16:10:03 2006
@@ -381,9 +381,9 @@
             pos=valEnd+1;
             
             if( nameEnd<=nameStart ) {
+                log.warn("Parameters: Invalid chunk ignored.");
                 continue;
                 // invalid chunk - it's better to ignore
-                // XXX log it ?
             }
             tmpName.setBytes( bytes, nameStart, nameEnd-nameStart );
             tmpValue.setBytes( bytes, valStart, valEnd-valStart );
@@ -392,6 +392,8 @@
                 addParam( urlDecode(tmpName, enc), urlDecode(tmpValue, enc) );
             } catch (IOException e) {
                 // Exception during character decoding: skip parameter
+                log.warn("Parameters: Character decoding failed. " + 
+                         "Parameter skipped.", e);
             }
 
             tmpName.recycle();

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=476988&r1=476987&r2=476988
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun Nov 19 16:10:03 2006
@@ -32,6 +32,10 @@
   </subsection>
   <subsection name="Coyote">
     <changelog>
+      <fix>
+        <bug>40860</bug>: Log exceptions and other problems during parameter
+        processing. (markt)
+      </fix>
     </changelog>
   </subsection> 
 </section>



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

Reply via email to