bugGNUstep - Bugs: bug #25003, NSURL doesn't support IPv6 host...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #25003: NSURL doesn't support IPv6 host addresses (RFC2732)

Submitted by:  Larry Campbell <lcampbel>
Submitted on:  Wed 03 Dec 2008 03:59:59 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Thu 04 Dec 2008 09:54:04 AM UTC, comment #1:

Possibly more of a change request than a bug ... but I've added ipv6 support in svn.
It would be nice if someone would contribute ipv6 support for NSHost and for the networking code, without it support for ipv6 syntax in NSURL is not all that much use.

Richard Frith-Macdonald <CaS>
Project Member
Wed 03 Dec 2008 03:59:59 PM UTC, original submission:

The following code snippet:

url = [[[NSURL alloc] initWithString:@"http://[2001:4860:0:2001::68/]"] autorelease];
NSLog(@"url host=\"%@\", absolute string=\"%@\"", [url host], [url absoluteString]);
url = [[[NSURL alloc] initWithScheme:@"http" host:@"2001:4860:0:2001::68" path:@"/"] autorelease];
NSLog(@"url host=\"%@\", absolute string=\"%@\"", [url host], [url absoluteString]);
url = [[[NSURL alloc] initWithScheme:@"http" host:@"[2001:4860:0:2001::68]" path:@"/"] autorelease];
NSLog(@"url host=\"%@\", absolute string=\"%@\"", [url host], [url absoluteString]);

produces:

2008-12-03 10:58:54.189 NSURLBug[19005] <NSException: 80b64f8> NAME:NSGenericException REASON:illegal character in port part
2008-12-03 10:58:54.236 NSURLBug[19005] url host="(nil)", absolute string="(nil)"
2008-12-03 10:58:54.236 NSURLBug[19005] <NSException: 80e9148> NAME:NSGenericException REASON:illegal character in port part
2008-12-03 10:58:54.237 NSURLBug[19005] url host="(nil)", absolute string="(nil)"
2008-12-03 10:58:54.237 NSURLBug[19005] <NSException: 80fe5a0> NAME:NSGenericException REASON:illegal character in port part
2008-12-03 10:58:54.237 NSURLBug[19005] url host="(nil)", absolute string="(nil)"

It seems there's no RFC2732 support in NSURL.

Larry Campbell <lcampbel>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by lcampbel (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 04 Dec 2008 09:54:04 AM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1