On Sun, 2009-11-01 at 23:27 +0000, Chris Young wrote: > On Sun, 01 Nov 2009 16:47:30 +0000, John-Mark Bell wrote: > > > Therefore, all file URIs in NetSurf are of the form: > > > > file:///<path> > > > > This is correct, per spec. > > The problem is, as NetSurf is assuming the localhost part, when it > actually encounters localhost as part of the path, it handles it > incorrectly, and you end up with file:///localhost/.
If it's part of the path, there should be no problem. > This wouldn't normally be a problem, but as the old Amiga browsers all > used file://localhost/ there are quite a number of scripts and > documentation launchers which don't work with NetSurf without this > change. Right, so they're actually specifying the host part. This needs some thought. Please stick a bug on the tracker. > The core should probably be stripping out the hostname part rather > than adding additional slashes in front of it. It's not quite that simple. There needs to be a reliable way of knowing that file://localhost/<path> really is requesting <path> on the local host, rather than "localhost" being the top-level component of the path. Most likely, the correct solution is some kind of DNS lookup (as you'd expect file://<hostname>/<path> to also work, where <hostname> is whatever the current host's name is). J.
