bugGNUstep - Bugs: bug #35437, NSURL.m incorrectly...

Group
 
 

bug #35437: NSURL.m incorrectly percent-encodes URLs

Submitter:  Larry Campbell <lcampbel>
Submitted:  Thu 02 Feb 2012 04:48:08 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 02 Feb 2012 06:31:06 PM UTC, comment #2: 

Fixed, thanks.

Richard Frith-Macdonald <CaS>
Group Member
Thu 02 Feb 2012 05:13:29 PM UTC, comment #1: 

Thanks ... fixed that ... the extra percent escaping should only be used for file URLs

Richard Frith-Macdonald <CaS>
Group Member
Thu 02 Feb 2012 04:48:08 PM UTC, original submission:  

r31501 in NSURL.m somehow managed to do exactly the wrong thing. It added question mark and semicolon to the set of characters that would be percent-escaped, but this is incorrect, and incompatible with Mac OS X.

This tiny test demonstrates the problem:

void test()
{
    NSURL *u = [[[NSURL alloc] initWithScheme:@"http" host:@"1.2.3.4" path:@"/a?b;foo"] autorelease];
    NSLog(@"url = %@", [u absoluteURL]);
}


On Mac OS X 10.6.8, it prints:

2012-02-02 11:42:51.673 urltest[410:903] url = http://1.2.3.4/a?b;foo

With gnustep-base 1.22.0 it prints:

2012-02-02 16:43:08.276 urltest[1743] url = http://1.2.3.4/a%3Fb%3Bfoo

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
    2012-02-02 CaS StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code