proposal for file: uri standard
Thomas Leonard
tal00r at ecs.soton.ac.uk
Wed Apr 7 13:30:18 EEST 2004
On Wed, Apr 07, 2004 at 10:07:18AM +0200, Alexander Larsson wrote:
> Are people ok with putting up this version on freedesktop.org?
Yep. One thing, though:
> > Hostnames
> > ---------
> >
> > When generating a file: uri the hostname part, if nonempty, should be
> > whatever is returned from gethostname(). This means that the name is
> > canonical for all users on the same machine, so that you can easily
> > see if the referenced file is on the current machine. Note that
> > "localhost" or an empty hostname needs to be handled specially, always
> > meaning the host the uri is being interpreted on.
I noticed we have this code in ROX-Filer to generate the hostname:
if (gethostname(buffer, 4096) == 0) {
/* gethostname doesn't always return the full name... */
struct hostent *ent;
buffer[4095] = '\0';
ent = gethostbyname(buffer);
name = g_strdup(ent ? ent->h_name : buffer);
However, perhaps such machines are just misconfigured?
--
Thomas Leonard http://rox.sourceforge.net
tal00r at ecs.soton.ac.uk tal197 at users.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1
More information about the xdg
mailing list