> Hi,
>
> I asked about this a week or two ago - and got a useful response.
> Summary: the client libraries don't currently do URL encoding. As a
> result, feeding them URLs with certain characters (spaces being the most
> common) causes Bad Things to happen. I asked whether it was the place of
> the client to do this, or the place of the client libraries. The answer
> was, I believe, that the libraries should.
>
> I also mentioned that I had code to do this. At that point, however, I
> wasn't actually on this list. As a result, I forgot about this until I
> got bitten by it again today.
>
> So, here's a patch for it.
>
> I'm fairly convinced that the approach I took in the URLEncoder class is
> overengineered in some ways, but still manages to miss doing the 'right
> thing' in certain obscure cases (that I don't think will be hit by
> anyone in practice. They mostly involve when to NOT escape parts of the
> url. Getting this right involves having deep structural knowledge of the
> URL. Actually providing methods for all of this would be painful, a lot
> of work, and probably unusable. It might be useful instead to have
> another path mutator which avoids the URL encoding, though, so that
> people can do the encoding themselves (with full knowledge of the
> semantics of the URL being encoded) outside of the library). So, you
> might not want to use this.
>
> However, it does the job for me, and is better than no solution, I
> think.
>
> Attached is a very small patch for WebdavMethodBase.java, and a new file
> (URLEncoder.java - I've put this in
> org.apache.webdav.lib.util.URLEncoder).
I'm aware of that particular issue, as I've been working during the past few
days to fix it in TC4. It looks like it's nearly done, ans when it is I'll
port over the code to the Slide WebDAV servlet.
Remy