Closed GoogleCodeExporter closed 9 years ago
Sharepoint is known to return illegal URIs that are not encoded.
Original comment by dkocher@sudo.ch
on 21 Jun 2012 at 4:59
I just encountered this issue as well, as my SharePoint server does indeed pass
spaces unencoded in the path part of its "href" elements. Fortunately nobody
was here to see my eyes roll back in my head and hear the muttering.
However, there's a quick fix if anybody needs it. In the constructor for
DavResource that takes a Response, instead of
this.href = new URI(response.getHref());
use
this.href = new URI(response.getHref().replace(" ", "%20"));
A similar change can obviously be made for the other constructor.
I was concerned about SP failing to encode other characters, like percent
signs, but it doesn't appear to allow such characters in filenames at all, so
they shouldn't occur in URLs.
Given what I'd think would be a pretty low impact of such a change, and the
wide deployment of SharePoint, it might be to Sardine's benefit to wince a bit
and deal with the improper URLs rather than have the items with spaces simply
be dropped from the directory list.
Original comment by jgarb...@gmail.com
on 11 Dec 2012 at 1:48
Original issue reported on code.google.com by
kevin.we...@gmail.com
on 14 Jun 2012 at 2:53