bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #35437] NSURL.m incorrectly percent-encodes URLs


From: Larry Campbell
Subject: [bug #35437] NSURL.m incorrectly percent-encodes URLs
Date: Thu, 02 Feb 2012 16:48:09 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-US) AppleWebKit/533.21.1+(KHTML, like Gecko, Safari/533.19.4) Version/5.11 OmniWeb/622.16.0

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]