On 30/06/17 22:18, Christopher Schultz wrote: > On 6/30/17 5:11 PM, Mark Thomas wrote:
<snip/> >> Arguably, & is the more correct but either approach is legal as >> far as the specifications are concerned. > > I'm surprised to hear that they are equivalent. > > If I were writing a WebDAV client (and it's probably good that I > wouldn't take this naïve approach, I guess), I would expect that the > URLs coming back should be XML-decoded (of course, the XML library > ought to do this for me). > > Let's say I have a file on the disk named "H&M.txt". > In the XML, I'll get back "H%26M.txt" as the filename. > When I convert that to a URL, I'll urlencode it and get "H%2526M.txt". > If I try to request that file, I'll fail, because I need to request > "H%26M.txt" or "H&M.txt" but instead I've double-encoded the filename. > > Is this something unique to the WebDAV spec (which I haven't read, > obviously)? What you are getting back is a URL so the expectation is that it is already correctly %nn encoded. See section 8.3.1 of RFC 4918. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org