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

Group
 
 

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

Submitter:  Larry Campbell <lcampbel>
Submitted:  Wed 03 Dec 2008 03:59:59 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-12-04 CaS StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code