gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSURL path question


From: Stefan Urbanek
Subject: NSURL path question
Date: Fri, 06 Feb 2004 17:55:29 +0100

Hi,

I would like to ask about NSURL path. I'll be more concrete, so here is example 
in StepTalk script. Consider two paths:

    url_slash := NSURL URLWithString:'http://www.gnustep.org/'.
    url_no_slash := NSURL URLWithString:'http://www.gnustep.org'.

then try to fetch contents of those URLs:

    string_ok := NSString stringWithContentsOfURL:url_slash.
    string_broken := NSString stringWithContentsOfURL:url_noslash.

The string_ok is loaded as it should. While loading the string_broken I get:

2004-02-06 17:44:16.300 stexec[483] File NSString.m: 1708. In 
[GSPlaceholderString -initWithContentsOfURL:] Contents of URL 
'http://www.gnustep.org' are not readable

What is the problem?
... path should be default '/' in NSURL?
... i should allways check whether path in the url is '/', so if there is no 
path, I should add it there?
... there is something wrong with NSURL handle for HTTP protocol?
... something else.

Stefan
--
http://stefan.agentfarms.net

First they ignore you, then they laugh at you, then they fight you, then you 
win.
- Mahatma Gandhi






reply via email to

[Prev in Thread] Current Thread [Next in Thread]