Re: URIs vs. half-baked URIs [glib PATCH]
- From: Daniel Veillard <veillard redhat com>
- To: Darin Adler <darin bentspoon com>
- Cc: Alex Larsson <alexl redhat com>, gtk-devel-list gnome org, gnome-hackers gnome org
- Subject: Re: URIs vs. half-baked URIs [glib PATCH]
- Date: Fri, 24 Aug 2001 15:11:59 -0400
On Fri, Aug 24, 2001 at 08:59:11AM -0700, Darin Adler wrote:
> On Friday, August 3, 2001, at 05:57 PM, Alex Larsson wrote:
>
> > + uri = g_strconcat ("file://", utf8_filename, NULL);
>
> Is it better to use file:///etc rather than file:/etc (you have to chose
> one as the canonical form when writing a function like this)?
The canonical form is definitely
file:///path
actually a contraction for
file://localhost/path
also note taht on Windows the path will start at index 8 in the URI
while it does start at index 7 everywhere else.
Last but not least I think that
file:/path
is a valid URI but one with an opaque part, not an hierachical one,
i.e. from an URI perspective there is no path in this URI (interpretation
of "/path" is left to the software handling the "file" protocol),
and you can't expand URI-References using this URI as the base
(../path2 has no meaning when starting from file:/path while it does when
starting from file:///path ...). So avoid it and rewrite it if you find it !
Daniel
--
Daniel Veillard | Red Hat Network http://redhat.com/products/network/
veillard redhat com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]