Re: -[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-11 Thread Mike Abdullah
On 10 Apr 2012, at 00:52, Jerry Krinock wrote: > > On 2012 Apr 09, at 16:01, Mike Abdullah wrote: > >> Can you tell us why you want the trailing slash maintained? > > I use it in a method which normalizes internet URLs. > > (I hate URL normalization, but my app must work with web browsers tha

Re: -[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-11 Thread Mike Abdullah
On 10 Apr 2012, at 01:05, Jerry Krinock wrote: > > On 2012 Apr 09, at 16:07, Mike Abdullah wrote: > >> The docs are incorrect about the escaping behaviour (and used to be for >> CFURLCopyPath too); both functions do not do escaping >> > > Ah, I was reading Xcode 3 documentation. > > In cur

Re: -[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-09 Thread Charles Srstka
On Apr 9, 2012, at 7:05 PM, Jerry Krinock wrote: > In current documentation, CFURLCopyStrictPath() still has the ambiguity, but > CFURLCopyPath() has been corrected. It says, unambiguously, "nor does it > replace percent escape sequences". The documentation says: "This function does not resol

Re: -[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-09 Thread Jerry Krinock
On 2012 Apr 09, at 16:07, Mike Abdullah wrote: > The docs are incorrect about the escaping behaviour (and used to be for > CFURLCopyPath too); both functions do not do escaping > Ah, I was reading Xcode 3 documentation. In current documentation, CFURLCopyStrictPath() still has the ambiguity,

Re: -[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-09 Thread Jerry Krinock
On 2012 Apr 09, at 16:01, Mike Abdullah wrote: > Can you tell us why you want the trailing slash maintained? I use it in a method which normalizes internet URLs. (I hate URL normalization, but my app must work with web browsers that do it, in various ways.) > Pretty much all path-based APIs o

Re: -[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-09 Thread Mike Abdullah
On 9 Apr 2012, at 21:15, Charles Srstka wrote: > On Apr 9, 2012, at 3:10 PM, Jens Alfke wrote: > >> >> On Apr 9, 2012, at 10:23 AM, Jerry Krinock wrote: >> >>> Thank you Ken. Indeed, CFURLCopyPath() gives the complete path, as >>> specified in RFC 3986! >> >> There are some other difference

Re: -[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-09 Thread Mike Abdullah
Can you tell us why you want the trailing slash maintained? Pretty much all path-based APIs on OS X ignore such slashes, so I'm assuming you want it for another reason. There may be a better API we can suggest. On 9 Apr 2012, at 06:18, Jerry Krinock wrote: > In the documentation of -[NSURL path

Re: -[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-09 Thread Mike Abdullah
On 9 Apr 2012, at 21:15, Charles Srstka wrote: > On Apr 9, 2012, at 3:10 PM, Jens Alfke wrote: > >> >> On Apr 9, 2012, at 10:23 AM, Jerry Krinock wrote: >> >>> Thank you Ken. Indeed, CFURLCopyPath() gives the complete path, as >>> specified in RFC 3986! >> >> There are some other difference

Re: -[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-09 Thread Charles Srstka
On Apr 9, 2012, at 3:10 PM, Jens Alfke wrote: > > On Apr 9, 2012, at 10:23 AM, Jerry Krinock wrote: > >> Thank you Ken. Indeed, CFURLCopyPath() gives the complete path, as >> specified in RFC 3986! > > There are some other differences too. Like, CFURLCopyPath doesn't interpret > %-escapes in

Re: -[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-09 Thread Jens Alfke
On Apr 9, 2012, at 10:23 AM, Jerry Krinock wrote: > Thank you Ken. Indeed, CFURLCopyPath() gives the complete path, as specified > in RFC 3986! There are some other differences too. Like, CFURLCopyPath doesn't interpret %-escapes in the path while -path does. —Jens __

Re: -[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-09 Thread Jerry Krinock
On 2012 Apr 09, at 08:55, Ken Thomases wrote: > Perhaps CFURLCopyPath()? Thank you Ken. Indeed, CFURLCopyPath() gives the complete path, as specified in RFC 3986! I'd still like to know why Apple (or NeXT?) added this slash-stripping "feature" to -[NSURL path].

Re: -[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-09 Thread Ken Thomases
On Apr 9, 2012, at 12:18 AM, Jerry Krinock wrote: > In the documentation of -[NSURL path], it says: > >"If the path has a trailing slash it is stripped." > > Indeed, when I create an NSURL from the string "http://example.com/blah/";, > its -path is "/blah". > > Does anyone know why? I nee

-[NSURL path] "If the path has a trailing slash it is stripped"

2012-04-08 Thread Jerry Krinock
In the documentation of -[NSURL path], it says: "If the path has a trailing slash it is stripped." Indeed, when I create an NSURL from the string "http://example.com/blah/";, its -path is "/blah". Does anyone know why? I need the path, the whole path, verbatim. Also, does anyone know a wo