ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: deivid.rodriguez@riseup.net
To: ruby-core@ruby-lang.org
Subject: [ruby-core:92713] [Ruby trunk Feature#15861] Correctly parse `file:c:/path/to/file` URIs
Date: Sat, 18 May 2019 16:02:13 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-78071.20190518160212.2f991a32cfab34ce@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15861.20190518152101@ruby-lang.org

Issue #15861 has been updated by deivid (David Rodríguez).


Yep, that's correct.

The alternative is to use the alternative form, but as you point out, the preceding slash is certainly inconvenient.

Anyways, thanks for considering this.

----------------------------------------
Feature #15861: Correctly parse `file:c:/path/to/file` URIs
https://bugs.ruby-lang.org/issues/15861#change-78071

* Author: deivid (David Rodríguez)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
Recently ruby has getting better at parsing URIs using the "file" scheme, with the addition of "URI::File". Still, some Windows edge cases are not implemented, and it would be nice to have them. For example, while the [addressable gem](https://github.com/sporkmonger/addressable) can correct parse "file:c:/path/to/file", the builtin library is not that smart yet:

``` 
irb(main):001:0> URI.parse("file:c:/path/to/file").path
=> nil
irb(main):002:0> require 'addressable'
=> true
irb(main):003:0> Addressable::URI.parse("file:c:/path/to/file").path
=> "c:/path/to/file"
```

I think this would be a matter of implementing https://tools.ietf.org/html/rfc8089#appendix-E.2, which is not normative but it would be certainly nice to have.



-- 
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>

  parent reply	other threads:[~2019-05-18 16:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-15861.20190518152101@ruby-lang.org>
2019-05-18 15:21 ` [ruby-core:92711] [Ruby trunk Feature#15861] Correctly parse `file:c:/path/to/file` URIs deivid.rodriguez
2019-05-18 15:37 ` [ruby-core:92712] " merch-redmine
2019-05-18 16:02 ` deivid.rodriguez [this message]
2019-05-18 16:05 ` [ruby-core:92714] " deivid.rodriguez
2019-05-18 22:58 ` [ruby-core:92718] " matthew

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-78071.20190518160212.2f991a32cfab34ce@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).