Forum: Ruby-core URI class doesn't do file URL's properly.

Posted by naruse (Yui NARUSE) (Guest)
on 2012-12-10 02:00
(Received via mailing list)
Issue #3594 has been updated by naruse (Yui NARUSE).


mame (Yusuke Endoh) wrote:
> Is this specified in RFC or any spec?

There's no available RFC of file URI scheme.

see also:
* http://en.wikipedia.org/wiki/File_URI_scheme
* http://suika.fam.cx/~wakaba/wiki/sw/n/file
----------------------------------------
Bug #3594: URI class doesn't do file URL's properly.
https://bugs.ruby-lang.org/issues/3594#change-34570

Author: NeilW (Neil Wilson)
Status: Assigned
Priority: Normal
Assignee: akira (akira yamada)
Category:
Target version:
ruby -v: ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]


=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
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.