Re: NSURLConnection issues
Re: NSURLConnection issues
- Subject: Re: NSURLConnection issues
- From: Jerry Krinock <email@hidden>
- Date: Thu, 30 Jul 2009 19:52:37 -0700
On 2009 Jul 30, at 17:44, Jack Carbaugh wrote:
I am working on a program that is basically a wrapper around some
web pages.
I am using NSURLConnection to download the various pages needed,
however, with 2 specific users, NSURLConnection returns immediately
with an error, NSURLErrorDomain Code -1005 "Lost Network Connection"
I've seen alot of weird stuff from NSURLConnection, but don't remember
that one.
To get another data point, try to connect to that server using the
command-line program 'curl' in Terminal.
Maybe the server you're connecting to doesn't like the User-Agent
presented by NSURLConnection. To set the User-Agent, it's kind of
weird -- you have to make your request mutable...
NSMutableURLRequest *mutableRequest = [request mutableCopy] ;
if (userAgent) {
[mutableRequest setValue:whatever
forHTTPHeaderField:@"User-Agent"] ;
}
If all fails, you might ask over on email@hidden
which may be a better forum for this.
_______________________________________________
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