Christian Sterzl wrote:
Andreas Hartmann <andreas <at> apache.org> writes:


There has been a bug in ProxyManager I spotted in
org.apache.lenya.net.ProxyManager#readConfig.

If spaces are in the path an URISyntaxException is thrown. Thus I think
it does make sense to add an replaceAll(" ", "%20") to the URI string.

configFile = new File(new
java.net.URI(ProxyManager.class.getClassLoader().getResource(fname).toSt
ring().replaceAll(" ","%20")));


The problem is that the URLEncoder adds the protocol and server information.
You could try to add this yourself and remove it after the encoding. Maybe
you could use the debugger to see what exactly is happening.



I think it is better to use the most simple method and just work with the
replaceAll-method.
Ya know, KISS

This only applies if the solution solves the problem without creating
other problems. If the code appears to do URL encoding, but actually doesn't,
this is clearly a bug.

-- Andreas


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

Reply via email to