• 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: NSURL / NSURLHandle loading problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURL / NSURLHandle loading problem


  • Subject: Re: NSURL / NSURLHandle loading problem
  • From: Ben Haller <email@hidden>
  • Date: Mon, 19 May 2003 20:42:09 -0700

The best way to get an answer is the explicitly show us the code that you are having a problem with.

Could do. But I think this is probably immaterial; I think the code example you give below is probably just fine for our purposes.

It is difficult to figure out what is wrong from reading your description of what you tried to do. Here is an example of how to use NSURL (from the url below):

Loading a string from a website
(this will block until it loads)

NSURL *url;
NSData *data;
NSString *blork;
url = [NSURL URLWithString: @"http://borkware.com/hacks/random";];
data = [url resourceDataUsingCache: NO];
blork = [[NSString alloc] initWithData: data encoding: NSASCIIStringEncoding];

Sure. No problem with any of this. But I strongly suspect that when your example code is run, NSURL is actually loading "http://borkware.com:80/hacks/random";, not "http://borkware.com/hacks/random";. And apparently some web servers have a problem with that. Mine did, although I have gotten my ISP to change its configuration.
So the question is, is there a way to turn of that addition of the default port of 80 to the URL fetched. Since my ISP has fixed the problem on their end, this is immaterial for my immediate purposes, but may still be an interesting question from a more academic point of view.

Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: NSURL / NSURLHandle loading problem (From: Don Arbow <email@hidden>)

  • Prev by Date: the art of #includes
  • Next by Date: How to get Input Menu setting + key characters?
  • Previous by thread: Re: NSURL / NSURLHandle loading problem
  • Next by thread: NSBorderlessWindowMask'd window doesn't let me type into NSTextField
  • Index(es):
    • Date
    • Thread