• 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: NSURLConnection issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSURLConnection issues (From: Jack Carbaugh <email@hidden>)

  • Prev by Date: NSURLConnection issues
  • Next by Date: [NSegmentedControl labelForSegment:]
  • Previous by thread: NSURLConnection issues
  • Next by thread: [NSegmentedControl labelForSegment:]
  • Index(es):
    • Date
    • Thread