Misc #13154
URI::Generic, == operator, normalize!
Status:
Open
Priority:
Normal
Assignee:
-
Description
This two URI means the same:
uri1 = URI::parse '/1/2/3' uri2 = URI::parse 'file:///1/2/3' `` but `uri1 == uri2` return **false** it is cause of normalize! implementation that compare scheme this way:
if scheme && scheme != scheme.downcase
set_scheme(self.scheme.downcase)
end
But nil scheme actually equivalent to file
Updated by phluid61 (Matthew Kerwin) about 4 years ago
Dmitry Sk wrote:
But nil scheme actually equivalent to file
Are you sure? I thought a URI::Generic
object with a nil
scheme is a relative reference. See: URI::Generic#merge and #relative?
Related: https://github.com/phluid61/file-uri