1
0
mirror of https://github.com/etesync/android synced 2024-12-26 08:28:17 +00:00

Fix invalid URLs one more time

This commit is contained in:
rfc2822 2013-11-17 13:04:57 +01:00
parent b802ed07d9
commit 66d6ec34d1

View File

@ -97,7 +97,7 @@ public class WebDavResource {
public WebDavResource(URI baseURL, boolean trailingSlash) throws URISyntaxException {
location = baseURL.normalize();
if (trailingSlash && !location.getPath().endsWith("/"))
if (trailingSlash && !location.getRawPath().endsWith("/"))
location = new URI(location.getScheme(), location.getSchemeSpecificPart() + "/", null);
// create new HTTP client
@ -200,7 +200,7 @@ public class WebDavResource {
/* file hierarchy methods */
public String getName() {
String[] names = StringUtils.split(location.getPath(), "/");
String[] names = StringUtils.split(location.getRawPath(), "/");
return names[names.length - 1];
}
@ -299,7 +299,7 @@ public class WebDavResource {
multiget.hrefs = new ArrayList<DavHref>(names.length);
for (String name : names)
multiget.hrefs.add(new DavHref(location.resolve(name).getPath()));
multiget.hrefs.add(new DavHref(location.resolve(name).getRawPath()));
Serializer serializer = new Persister();
StringWriter writer = new StringWriter();