Issue #3594 has been updated by mame (Yusuke Endoh).
[RFC 8089 (The "file" URI Scheme)](https://tools.ietf.org/html/rfc8089) 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 ) ]
```
So, `"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?
----------------------------------------
Bug #3594: URI class doesn't do file URL's properly.
https://bugs.ruby-lang.org/issues/3594#change-67973
* Author: NeilW (Neil Wilson)
* Status: Assigned
* Priority: Normal
* Assignee: akira (akira yamada)
* Target version:
* ruby -v: ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
=begin
URI doesn't seem to output file URLs properly where there is an absolute path part.
For example.
require 'uri'
my_url = URI.parse("file:///var/lib/libvirt/images/")
p my_url.to_s
"file:/var/lib/libvirt/images/"
The double slash '//' should always appear according to the file URL specification.
=end
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>