- From: Norm Tovey-Walsh <ndw@nwalsh.com>
- Date: Wed, 18 Jun 2025 15:25:52 +0100
- To: Wendell Piez <wapiez@wendellpiez.com>
- Cc: XProc Dev <xproc-dev@w3.org>
Wendell Piez <wapiez@wendellpiez.com> writes: > What I would most like to know is whether creating such a function was unnecessary, since there is already a simple way to do a fairly 'ordinary' thing. I believe that p:urify() will resolve “.” and “..” for you. > I'm also wondering what makes this hard? Everything about URIs is hard. Off the top of my head: 1. You can’t blindly replace them because the replacement only applies to hierarchical schemes. 2. Even in hierarchical schemes, they can’t be blindly replaced because, for example, the “..” in “abc..xyz” isn’t a path segment. 3. The thing to replace isn’t *always* “../” because the “..” in “path/..” (assuming that’s the end of the string) is also a path segment. 4. You can’t allow “../” to walk “off the front” of the path. 5. You have to be careful of the distinction between “/” and “%2F” and between ".” and “%2E”. And there are probably three other edge cases I haven’t thought of at the moment. Be seeing you, norm -- Norm Tovey-Walsh <ndw@nwalsh.com> https://norm.tovey-walsh.com/ > Another month ends. All targets met. All systems working. All customers > satisfied. All staff eager and enthusiastic. All pigs fed and ready for > take off.
Received on Wednesday, 18 June 2025 14:26:00 UTC