mikechambers / as3corelib

An ActionScript 3 Library that contains a number of classes and utilities for working with ActionScript? 3. These include classes for MD5 and SHA 1 hashing, Image encoders, and JSON serialization as well as general String, Number and Date APIs.
1.49k stars 448 forks source link

URI.makeAbsoluteURI does not handle local windows filepaths properly #139

Open darronschall opened 14 years ago

darronschall commented 14 years ago

Originally filed by gae.local.test on 2010-07-12T05:40:26

_uri1 = new URI("example.txt"); _url2 = new URI("file://C:/path/to/aDifferentExample.txt"); _uri1.makeAbsoluteURI(_url2 ).toString() returns the string "file://c/path/toexample.txt"

expected output --> string "file://c:/path/to/toexample.txt" (notice the colon in c:/)

I copy and pasted trace output and then shortened for readability. The problem is that the method is removing the colon after the drive identifier.

I am using the current revision at revision 118 according to tortoise svn

darronschall commented 14 years ago

Updated by gae.local.test on 2010-07-12T05:41:54

I made copy and paste errors. The only thing that is wrong with the string it prints out is the missing colon after the drive letter. I can't edit my post to fix it.

LexLythius commented 13 years ago

Please note that file://c:/path/to/toexample.txt is actually a broken URI. It should encode to file:///c:/path/to/toexample.txt which equates to file://localhost/c:/path/to/toexample.txt