[Date Prev][Date Next]
Re: representing file pathnames
On Aug 9, 2012, at 1:40 PM, Michael Ströder wrote:
> Chuck Lever wrote:
>> It's been suggested that we use a file URL to represent export pathnames.
>> A file URL is expressed in US-ASCII with escaping,
>> Can we represent the full range of the UTF-8 code set with a US-ASCII file
> Yes, of course just like HTTP URLs can contain non-ASCII chars in an
> URL-quoted form. You first encode to UTF-8 and then URL-quote. Decoding means
> URL-unquote and the decode UTF-8 to Unicode char entities.
>> We could also use an NFS URL, which would allow us to express the server
>> hostname, a port number, and the pathname in a single string. But both the
>> hostname and pathname are enocded in US-ASCII, not UTF-8, and the NFS URL
>> format employs a fixed pathname separator character.
> That's what I would prefer. Think of file browsers which can open the NFS
> mount point just by clicking on it. Same encoding steps as with file URLs.
One final question about this.
NFS fs_locations data can contain, as the file server's hostname: an i18n DNS label, an IPv4 presentation address, or an IPv6 presentation address. Any of these can be specified with or without a port number.
The problem lies with IPv6 presentation addresses with a port specified. For a URL the form is generally:
"nfs://" presentation-address ":" port "/" pathname
But as we all know, IPv6 addresses have a variable number of colons in them.
For NFS administrative interfaces, we generally just escape an IPv6 presentation address by surrounding it with square brackets. Then it's easy to recognize and pick off the ":port".
What is the appropriate URL syntax for specifying an IPv6 presentation address with a port?