Re: stringWithContentsOfURL doesn't work sometimes
Re: stringWithContentsOfURL doesn't work sometimes
- Subject: Re: stringWithContentsOfURL doesn't work sometimes
- From: Nicko van Someren <email@hidden>
- Date: Wed, 13 Jul 2005 12:38:46 +0100
On 13 Jul 2005, at 12:16, j o a r wrote:
On 13 jul 2005, at 12.48, Lorenzo wrote:
I meant that the API stringWithContentsOfURL cannot get the string
and my
screensaver freezes just there. Nothing to do with resources.
I think that you should basically never use the "initWithURL:"
methods. In the vast majority of cases you want something that's
asynchronous and that have better error reporting. Have a look at
NSURLConnection for example, it's easy to use and powerful enough
for most things you would want to do.
Also all the initWith(ContentsOf)URL: methods which ultimately use
the NSData method of that name (which is most of them) inherit the
still unfixed bug that if the web server supports content compression
in transit then you end up with completely the wrong data. This is
because the request sent to the server explicitly indicates that the
client will accept gzip transport compression but the client then
ignores the server telling it that compression was used, you are
handed back the compressed transport stream rather than the real
content.
Nicko
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden