Skip to content

Commit

Permalink
Revert "handle IPv6 host (#614)" (#617)
Browse files Browse the repository at this point in the history
This reverts commit ca4eb72e07a7daaa5901dc310cb5e632f288dc7b.
  • Loading branch information
estolfo authored Mar 7, 2019
1 parent 640e2aa commit 2fe716e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
4 changes: 0 additions & 4 deletions lib/elasticsearch/transport/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,6 @@ def __parse_host(host)
:host => uri.host,
:path => uri.path,
:port => uri.port }
elsif host =~ /^\[[a-z0-9:]+\]:[0-9]+/
host, sep, port = host.rpartition(':')
{:host => host,
:port => port}
else
host, port = host.split(':')
{ :host => host,
Expand Down
13 changes: 0 additions & 13 deletions spec/elasticsearch/transport/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,6 @@
expect(hosts[0][:port]).to be(9200)
end

context 'when ipv6 is specified' do

let(:host) do
'[fd95:ff55:7fb8:f1e5:f816:3eff:feed:ce5b]:9200'
end

it 'extracts the host' do
expect(hosts[0][:host]).to eq('[fd95:ff55:7fb8:f1e5:f816:3eff:feed:ce5b]')
expect(hosts[0][:scheme]).to eq('http')
expect(hosts[0][:port]).to be(9200)
end
end

context 'when a path is specified' do

let(:host) do
Expand Down

0 comments on commit 2fe716e

Please sign in to comment.