Project

General

Profile

Backport #10875

backport r48666 lib/uri/generic.rb (URI::Generic.build)

Added by jrafanie (Joe Rafaniello) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[ruby-core:68202]

Description

Fix URI::Generic.build to properly build IPv6 host values with square brackets.

use hostname= to detect and wrap IPv6 hosts.
Build is accepting URI components and users may not expect
that a host component needs to be wrapped with square brackets
since it's not providing a URI.

https://github.com/ruby/ruby/commit/4ec9793ba88b27028c826c6bc6c49ee59df8d920
https://github.com/ruby/ruby/pull/765


Related issues

Related to Backport200 - Backport #10873: backport r48666 lib/uri/generic.rb (URI::Generic.build)Closed02/20/2015Actions

Associated revisions

Revision 2d5f7e5e
Added by nagachika (Tomoyuki Chikanaga) over 4 years ago

merge revision(s) r48666: [Backport #10875]

    * lib/uri/generic.rb (URI::Generic.build):
      use hostname= to detect and wrap IPv6 hosts.
      Build is accepting URI components and users may not expect
      that a host component needs to be wrapped with square brackets
      since it's not providing a URI.
      Note: initialize with arg_check => true does not wrap IPv6 hosts.
      by Joe Rafaniello <jrafanie@redhat.com>
      https://github.com/ruby/ruby/pull/765 fix GH-765

    * test/uri/test_generic.rb: Add more tests

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@49907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 49907
Added by nagachika (Tomoyuki Chikanaga) over 4 years ago

merge revision(s) r48666: [Backport #10875]

* lib/uri/generic.rb (URI::Generic.build):
  use hostname= to detect and wrap IPv6 hosts.
  Build is accepting URI components and users may not expect
  that a host component needs to be wrapped with square brackets
  since it's not providing a URI.
  Note: initialize with arg_check => true does not wrap IPv6 hosts.
  by Joe Rafaniello <jrafanie@redhat.com>
  https://github.com/ruby/ruby/pull/765 fix GH-765

* test/uri/test_generic.rb: Add more tests

History

#1

Updated by usa (Usaku NAKAMURA) over 4 years ago

  • Related to Backport #10873: backport r48666 lib/uri/generic.rb (URI::Generic.build) added
#2

Updated by nagachika (Tomoyuki Chikanaga) over 4 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r49907.


merge revision(s) r48666: [Backport #10875]

* lib/uri/generic.rb (URI::Generic.build):
  use hostname= to detect and wrap IPv6 hosts.
  Build is accepting URI components and users may not expect
  that a host component needs to be wrapped with square brackets
  since it's not providing a URI.
  Note: initialize with arg_check => true does not wrap IPv6 hosts.
  by Joe Rafaniello <jrafanie@redhat.com>
  https://github.com/ruby/ruby/pull/765 fix GH-765

* test/uri/test_generic.rb: Add more tests

Also available in: Atom PDF