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 macnetworkp...@lists.apple.com which may be a better forum for this.

_______________________________________________

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

Reply via email to