Re: Weird behavior of -URLByAppendingPathComponent:

2011-06-20 Thread Nathan Sims
FWIW, the standard (can't remember which RFC I saw this in) is for treating a double slash // (or any number of slashes) as a single slash / in URLs (after the initial http://). On Jun 19, 2011, at 9:14 PM, Jens Alfke wrote: > Something seems wrong with -[NSURL URLByAppendingPathComponent:] --

Re: Weird behavior of -URLByAppendingPathComponent:

2011-06-19 Thread Tony Romano
I can repro that as well, and I'd say it's a bug. I also tried this as well: Using: NSURL *baseURL = [NSURL URLWithString:@"http://129.0.0.1/";]; (gdb) po [baseURL URLByAppendingPathComponent: @"/foo"] http://129.0.0.1//foo according to the discussion for URLAppendingPathComponent: "If the

Weird behavior of -URLByAppendingPathComponent:

2011-06-19 Thread Jens Alfke
Something seems wrong with -[NSURL URLByAppendingPathComponent:] -- (gdb) po baseURL http://127.0.0.1:5984/ (gdb) po [baseURL URLByAppendingPathComponent: @"foo"] http://127.0.0.1:5984/foo (gdb) po [baseURL URLByAppendingPathComponent: @"foo/"] http://127.0.0.1:5984/foo// Why the doubled slash at