• 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
Stuck with NSURL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stuck with NSURL


  • Subject: Stuck with NSURL
  • From: Mike Davis <email@hidden>
  • Date: Sun, 20 Jan 2002 15:34:25 -0500

Take a look at this URL in IE or OmniWeb:

http://www.gameaholic.com/servers/qspy-quake2

Now take a look at it with:

NSURL *theURL = [NSURL URLWithString:@"http://www.gameaholic.com/servers/qspy-quake2";];
NSData *theData;
NSString *theString;

if( ( theData = [theURL resourceDataUsingCache:NO] ) != nil ) {
theString = [[[NSString alloc] initWithData:theData encoding:[NSString defaultCStringEncoding]] autorelease];
NSLog( theString );
}

I don't get what I expected.

So... I took a look at it with telnet:

telnet www.gameaholic.com 80
GET /servers/qspy-quake2 HTTP/1.0


Remember the blank line.

I notice that the MIME type is html, which it really isn't. IE and OmniWeb seem happy about it though.

Any ideas how I can fix this or am I going to have to resort to socket code?

Mike.


  • Follow-Ups:
    • Re: Stuck with NSURL
      • From: Ben Hines <email@hidden>
  • Prev by Date: Re: Location of .jar files?
  • Next by Date: Re: long long int
  • Previous by thread: Problems with cursor methods
  • Next by thread: Re: Stuck with NSURL
  • Index(es):
    • Date
    • Thread