Re: [Pharo-users] The best way to construct a file/url path handling misplaced $/ chars

2019-03-08 Thread Esteban Maringolo
I don't know whether you want to build just "paths" or valid URIs, if it's the latter, I'd suggest ZnUrl as well. '/name/' asPath / 'resource'. -> /name/resource '/name/' asPath / '/resource'. -> /resource (which is correct) '/name/' asUrl / '/resource' -> /name//resource (which is correct as

Re: [Pharo-users] The best way to construct a file/url path handling misplaced $/ chars

2019-03-08 Thread Cédrick Béler
'/foo//' copyWithoutAll: '/' > Le 8 mars 2019 à 12:40, Cédrick Béler a écrit : > > Not sure but I would use ZnUrl > > ZnUrl new > scheme: #http; > host: NetNameResolver loopBackName; > addPathSegments: #('echo' 'foo'); > yourself > >

Re: [Pharo-users] The best way to construct a file/url path handling misplaced $/ chars

2019-03-08 Thread Cédrick Béler
Not sure but I would use ZnUrl ZnUrl new scheme: #http; host: NetNameResolver loopBackName; addPathSegments: #('echo' 'foo'); yourself Making sure Path segments do not contain separator… Hth, Cédrick > Le 8 mars 2019 à 12:33,

[Pharo-users] The best way to construct a file/url path handling misplaced $/ chars

2019-03-08 Thread Tim Mackinnon
I’m sure we have something in the image that deals with this - but if writing a generic http retriever and wanting to correctly cope with constructing resource paths where the base path may or may not have a trailing /, and the resource path may or may not have a leading / Basically -