On 7 October 2011 12:45, Martin Linklater <mslinkla...@gmail.com> wrote: > Hi - I'm writing an iOS client for an online retailer and I'm having trouble > with the way NSURL encodes square brackets. I'm building an http request > using a string then converting it to a NSURL before calling [NSData > dataWithContentsOfURL]. > > The troblesome piece of the http path is: &prices[1821561]=1 > > This gets converted to this in NSURL: &prices%5B1821561%5D=1
'[' and ']' are "unwise" characters, and NSURL is doing the correct thing in accordance with RFC2396. Cheers, -- Igor :-) _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com