atom feed5 messages in net.sourceforge.lists.exist-openRe: [Exist-open] Special chars in doc...
FromSent OnAttachments
HungerburgDec 22, 2011 5:52 am 
Joe WicentowskiDec 22, 2011 6:18 am 
HungerburgDec 22, 2011 6:48 am 
HungerburgDec 22, 2011 8:50 am 
HungerburgDec 22, 2011 1:33 pm.java
Subject:Re: [Exist-open] Special chars in document names in rest, webdav and rpc
From:Hungerburg (pch@myzel.net)
Date:Dec 22, 2011 1:33:28 pm
List:net.sourceforge.lists.exist-open
Attachments:

Am 2011-12-22 17:50, schrieb Hungerburg:

It should be safe to make line 362 read:

- XmldbURI pathUri = XmldbURI.create( URLDecoder.decode( path , "UTF-8" ) ); + XmldbURI pathUri = XmldbURI.create( new URI( path ).getPath() );

Attached code to see it working and test with different paths. $ javac uri.java && java uri

There must be other places with the same mistake.

Thank you

Peter

import java.net.URI; import java.net.URISyntaxException;

public class uri { public static void main(String args[]) { String path; try { path = "c+c.xml"; System.out.println(new URI(path).getPath()); // c+c.xml

path = "c%20c.xml"; System.out.println(new URI(path).getPath()); // c c.xml

path = "c#c.xml"; System.out.println(new URI(path).getPath()); // c } catch (URISyntaxException e) { System.out.println(e.toString()); } } }

------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev