tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1345754 - /tomcat/trunk/java/org/apache/tomcat/util/http/parser/AstMediaType.java
Date Sun, 03 Jun 2012 20:03:30 GMT
Author: markt
Date: Sun Jun  3 20:03:30 2012
New Revision: 1345754

URL: http://svn.apache.org/viewvc?rev=1345754&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53353
Additional fix

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/http/parser/AstMediaType.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/parser/AstMediaType.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/parser/AstMediaType.java?rev=1345754&r1=1345753&r2=1345754&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/parser/AstMediaType.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/parser/AstMediaType.java Sun Jun  3 20:03:30
2012
@@ -58,8 +58,12 @@ public class AstMediaType extends Simple
             AstParameter p = (AstParameter) children[i];
             if (!CHARSET.equalsIgnoreCase(
                     p.children[0].jjtGetValue().toString())) {
-                sb.append(';');
-                sb.append(p.toString());
+                String s = p.toString();
+                // Invalid parameters will have zero length - skip them
+                if (s.length() > 0) {
+                    sb.append(';');
+                    sb.append(p.toString());
+                }
             }
         }
         return sb.toString();



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


Mime
View raw message