Author: rjung
Date: Mon Jul 9 01:43:45 2007
New Revision: 554561
URL: http://svn.apache.org/viewvc?view=rev&rev=554561
Log:
BZ 39813: Correct handling of new line characters in JMX attributes.
Patch provided by R Bramley. Ported from tc5.5.x r415029.
Modified:
tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
Modified: tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml?view=diff&rev=554561&r1=554560&r2=554561
==============================================================================
--- tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/branches/tc5.0.x/webapps/docs/changelog.xml Mon Jul 9
01:43:45 2007
@@ -76,6 +76,10 @@
<subsection name="Webapps">
<changelog>
<fix>
+ <bug>39813</bug>: Correct handling of new line characters in JMX
+ attributes. Patch provided by R Bramley. Ported from tc5.5.x r415029.
(markt,rjung)
+ </fix>
+ <fix>
Fixed struts-config.xml for Admin webapp after move to Struts v1.2.
(amyroh)
</fix>
<fix>
Modified:
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
URL:
http://svn.apache.org/viewvc/tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java?view=diff&rev=554561&r1=554560&r2=554561
==============================================================================
---
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
(original)
+++
tomcat/container/branches/tc5.0.x/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java
Mon Jul 9 01:43:45 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -81,7 +82,6 @@
response.setContentType("text/plain");
PrintWriter writer = response.getWriter();
- String qryString= request.getQueryString();
if( mBeanServer==null ) {
writer.println("Error - No mbean server");
@@ -190,7 +190,7 @@
int prev=0;
StringBuffer sb=new StringBuffer();
while( idx >= 0 ) {
- appendHead(sb, value, prev, idx-1);
+ appendHead(sb, value, prev, idx);
sb.append( "\\n\n ");
prev=idx+1;
@@ -203,6 +203,8 @@
}
private void appendHead( StringBuffer sb, String value, int start, int
end) {
+ if (end < 1) return;
+
int pos=start;
while( end-pos > 78 ) {
sb.append( value.substring(pos, pos+78));
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]