Description: |
The uri package is failing the recent uri::canonicalize
tests under Win32 systems.
The problem is some of the tests are using the file
scheme with a hostname part:
file://localhost/a/b/c
When using Windows a split and join operation results in
file://localhost:/a/b/c
due to code in the uri::join for the file scheme.
Common usage under windows is to permit the drive
letter to be used as the host part and we are
supporting this - however, we must also support the RFC
specification too.
We can expect to use file://c:/autoexec.bat (although
this should strictly be file:///c:/autoexec.bat - thus
using a null host part). Also we must permit
file://localhost/c:/ as this is what the RFC specifies.
Other problems: the path section must be in the URL/URI
style.
% uri::join scheme file path {c:\windows}
file://c:\windows
This _MUST_ be file://c:/windows. Backslashes are
illegal in URLs. This goes for Mac's and VMS too. I
believe that [file normalize] will fix the host's path
into very nearly correct RFC style. Probably just need
some quoting of illegal characters (like space). [file
native] should probably be invoked in the uri::split
function too.
|