Skip to content

Instantly share code, notes, and snippets.

@AlanQuatermain
Created May 4, 2012 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlanQuatermain/2595560 to your computer and use it in GitHub Desktop.
Save AlanQuatermain/2595560 to your computer and use it in GitHub Desktop.
// This works:
NSURL * base = [NSURL URLWithString: @"http://[::1]:49981/"];
NSURL * full = [base URLByAppendingPathComponent: @"test.html"];
NSLog(@"full = %@", full); // prints "full = http://[::1]:49981/"
// This does not:
NSURL * base = [NSURL URLWithString: @"" relativeToURL: [NSURL URLWithString: @"http://[::1]:49981/"];
NSURL * full = [base URLByAppendingPathComponent: @"test.html"];
NSLog(@"full = %@", full); // prints "full = (null)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment