URI class doesn't do file URL's properly.
URI doesn't seem to output file URLs properly where there is an absolute path part.
my_url = URI.parse("file:///var/lib/libvirt/images/")
The double slash '//' should always appear according to the file URL specification.
#5 [ruby-core:83918] Updated by mame (Yusuke Endoh) 10 months ago
RFC 8089 (The "file" URI Scheme) has been published in 2017. It says:
file-URI = file-scheme ":" file-hier-part file-scheme = "file" file-hier-part = ( "//" auth-path ) / local-path auth-path = [ file-auth ] path-absolute local-path = path-absolute
and RFC 3986 says:
path-absolute = "/" [ segment-nz *( "/" segment ) ]
"file:/var/lib/libvirt/images/" does not conform the spec, I think.
The maintainer of lib/uri.rb is Akira Yamada, who seems inactive. Does anyone want to investigate and fix this issue?