URL:
  <http://savannah.gnu.org/bugs/?35437>

                 Summary: NSURL.m incorrectly percent-encodes URLs
                 Project: GNUstep
            Submitted by: lcampbel
            Submitted on: Thu 02 Feb 2012 04:48:08 PM GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35437>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to