From eed566debe11a12eb36a9aa6b8f950b2649f7047 Mon Sep 17 00:00:00 2001 From: nagachika Date: Tue, 16 Aug 2016 02:48:59 +0000 Subject: merge revision(s) 55563: [Backport #12498] * lib/uri/mailto.rb (initialize): RFC3986_Parser#split sets opaque only if the URI has path-rootless, not path-empty. [ruby-core:76055] [Bug #12498] patched by Chris Heisterkamp git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/uri/mailto.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/uri/mailto.rb b/lib/uri/mailto.rb index 495f939a3b..7299550d3f 100644 --- a/lib/uri/mailto.rb +++ b/lib/uri/mailto.rb @@ -136,6 +136,9 @@ module URI @to = nil @headers = [] + # The RFC3986 parser does not normally populate opaque + @opaque = "?#{@query}" if @query && !@opaque + unless @opaque raise InvalidComponentError, "missing opaque part for mailto URL" -- cgit v1.2.3