'file' URI scheme

Thiago Macieira thiago at kde.org
Sun Mar 30 15:58:37 PDT 2008


Luke -Jr wrote:
>On Sunday 30 March 2008, Thiago Macieira wrote:
>> >file:///etc;foo/config;bar/some.conf;hi
>>
>> What parameters?
>
>Section 3.3 of RFC 2396 (Uniform Resource Identifiers (URI): Generic
> Syntax)

RFC 3986 is newer. But we're talking about URLs here, which are a specific 
subset of URIs. The parameters do not apply.

>
>> That URL above maps to the file:
>>
>> 	/etc;foo/config;bar/some.conf;hi
>>
>> I doubt that file exists in your system. If there's any such thing as
>> parameters, they must be handled by the open(2) system call.
>
>Path component parameters are defined in the URI standard, but (AFAIK)
> do not exist in any POSIX standard-- nor does Linux itself provide
> support for URIs, as far as I am aware.

There's an XDG standard. It requires that the contents of the URL be the 
exact byte value passed to the system calls, regardless of encoding or 
locale.

[RFC 3987 requires URIs to be in UTF-8, which means that practically the 
only valid encoding on Linux now is UTF-8.]

>The URI RFC, while it does not define the application of parameters in
> file URIs, does define that "The parameters are not significant to the
> parsing of relative references.", which I read as meaning that
> "..;foo/bar" acts the same as "../bar". Following this logic, it would
> seem the "proper" thing to do in a file URI is to ignore unrecognized
> parameters and map my example to /etc/config/some.conf

Please read the URL RFC and the file:/// XDG spec. Those are more relevant 
to the case here.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/xdg/attachments/20080331/13226ffa/attachment.pgp 


More information about the xdg mailing list