Author: markt
Date: Thu May 31 20:41:02 2012
New Revision: 1344901
URL: http://svn.apache.org/viewvc?rev=1344901&view=rev
Log:
Additional fix missing from r1344890
Modified:
tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
tomcat/trunk/res/checkstyle/org-import-control.xml
Modified:
tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java?rev=1344901&r1=1344900&r2=1344901&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
(original)
+++ tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
Thu May 31 20:41:02 2012
@@ -41,6 +41,7 @@ import javax.naming.directory.DirContext
import org.apache.naming.JndiPermission;
import org.apache.tomcat.util.buf.UDecoder;
+import org.apache.tomcat.util.buf.UEncoder;
import org.apache.tomcat.util.http.FastHttpDateFormat;
/**
@@ -57,7 +58,11 @@ import org.apache.tomcat.util.http.FastH
public class DirContextURLConnection extends URLConnection {
private static final UDecoder URL_DECODER = new UDecoder();
+ private static final UEncoder URL_ENCODER = new UEncoder();
+ static{
+ URL_ENCODER.addSafeCharacter('/');
+ }
// ----------------------------------------------------------- Constructors
@@ -456,7 +461,7 @@ public class DirContextURLConnection ext
context.list(file.substring(start));
while (enumeration.hasMoreElements()) {
NameClassPair ncp = enumeration.nextElement();
- result.addElement(ncp.getName());
+ result.addElement(URL_ENCODER.encodeURL(ncp.getName()));
}
} catch (NamingException e) {
// Unexpected exception
Modified: tomcat/trunk/res/checkstyle/org-import-control.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/res/checkstyle/org-import-control.xml?rev=1344901&r1=1344900&r2=1344901&view=diff
==============================================================================
--- tomcat/trunk/res/checkstyle/org-import-control.xml (original)
+++ tomcat/trunk/res/checkstyle/org-import-control.xml Thu May 31 20:41:02 2012
@@ -107,6 +107,7 @@
<allow pkg="javax.wsdl"/>
<allow pkg="org.apache.naming"/>
<allow class="org.apache.tomcat.util.buf.UDecoder"/>
+ <allow class="org.apache.tomcat.util.buf.UEncoder"/>
<allow class="org.apache.tomcat.util.http.FastHttpDateFormat"/>
<allow class="org.apache.tomcat.util.http.RequestUtil"/>
<subpackage name="factory.webservices">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]