From: Colin P. A. <co...@co...> - 2007-02-03 17:50:57
|
It appears that my correction to {UT_FILE_URI_ROUTINES}.pathname_to_uri on 20061221 was only partly correct. It now produces file URIs of the form: file:/home/colin/... instead of the former result: file://localhost/home/colin/... Neither is canonical. The correct form is: file:///home/colin/... The current form is consistent with what is produced by Java, but this does not make it correct. So I am changing the routine to now look like this: if a_pathname.is_relative then create Result.make_relative check no_hostname_when_relative: a_pathname.hostname = Void end else create Result.make_absolute (File_scheme) if a_pathname.hostname /= Void then Result.set_authority (hostname_to_authority (a_pathname.hostname)) -- removed for correct canonization - CPA - 20061221: else -- Result.set_authority (hostname_to_authority (Localhost_authority)) else -- added for correct canonization - CPA - 20070203: Result.set_authority (hostname_to_authority ("")) end end etc. -- Colin Adams Preston Lancashire |