• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: urlFromString creating bad URLs with string containing []
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: urlFromString creating bad URLs with string containing []


  • Subject: Re: urlFromString creating bad URLs with string containing []
  • From: Igor Mozolevsky <email@hidden>
  • Date: Fri, 07 Oct 2011 12:54:32 +0100

On 7 October 2011 12:45, Martin Linklater <email@hidden> 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[1821561]=1

'[' and ']' are "unwise" characters, and NSURL is doing the correct
thing in accordance with RFC2396.


Cheers,

--
Igor :-)
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >urlFromString creating bad URLs with string containing [] (From: Martin Linklater <email@hidden>)

  • Prev by Date: urlFromString creating bad URLs with string containing []
  • Next by Date: Re: urlFromString creating bad URLs with string containing []
  • Previous by thread: urlFromString creating bad URLs with string containing []
  • Next by thread: Re: urlFromString creating bad URLs with string containing []
  • Index(es):
    • Date
    • Thread