Re: NSURL / NSURLHandle loading problem
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.