Re: urlFromString creating bad URLs with string containing []

2011-10-14 Thread Mike Abdullah
Probably only moderately better, since at best you're saving spinning up a thread. Most important is that NSURLConnection is cancellable, and has delegate methods you can implement for more control. On 12 Oct 2011, at 20:21, Martin Linklater wrote: Thanks Mike, At the moment I'm using

Re: urlFromString creating bad URLs with string containing []

2011-10-12 Thread Martin Linklater
Thanks Mike, At the moment I'm using [NSData +dataWithContentsOfURL] running in its own GCD dispatch queue. How much better performance should I expect to get using NSURLConnection ? I'll need to weigh up the benefits before I go refactoring the server code. Cheers. On 7 Oct 2011, at 15:04,

urlFromString creating bad URLs with string containing []

2011-10-07 Thread Martin Linklater
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:

Re: urlFromString creating bad URLs with string containing []

2011-10-07 Thread Igor Mozolevsky
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

Re: urlFromString creating bad URLs with string containing []

2011-10-07 Thread Roland King
Is that a valid URL? I looked at the old RFC from 1994 and that defines '[' and ']' as 'national' characters and states they must not appear in URLs. So it would seem the online retailer you're dealing with accepts URLs it shouldn't accept, but doesn't accept the properly encoded version of

Re: urlFromString creating bad URLs with string containing []

2011-10-07 Thread Martin Linklater
Thanks Roland. I'm close enough to hopefully get them to make the required changes at there end. Cheers On 7 Oct 2011, at 12:58, Roland King wrote: Is that a valid URL? I looked at the old RFC from 1994 and that defines '[' and ']' as 'national' characters and states they must not appear

Re: urlFromString creating bad URLs with string containing []

2011-10-07 Thread Mike Abdullah
On 7 Oct 2011, at 12:45, Martin Linklater 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