Skip to content

Commit 9a790f4

Browse files
authored
Revert "handle IPv6 host (#614)" (#617)
This reverts commit ca4eb72.
1 parent ca4eb72 commit 9a790f4

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

elasticsearch-transport/lib/elasticsearch/transport/client.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,6 @@ def __parse_host(host)
201201
:host => uri.host,
202202
:path => uri.path,
203203
:port => uri.port }
204-
elsif host =~ /^\[[a-z0-9:]+\]:[0-9]+/
205-
host, sep, port = host.rpartition(':')
206-
{:host => host,
207-
:port => port}
208204
else
209205
host, port = host.split(':')
210206
{ :host => host,

elasticsearch-transport/spec/elasticsearch/transport/client_spec.rb

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,6 @@
126126
expect(hosts[0][:port]).to be(9200)
127127
end
128128

129-
context 'when ipv6 is specified' do
130-
131-
let(:host) do
132-
'[fd95:ff55:7fb8:f1e5:f816:3eff:feed:ce5b]:9200'
133-
end
134-
135-
it 'extracts the host' do
136-
expect(hosts[0][:host]).to eq('[fd95:ff55:7fb8:f1e5:f816:3eff:feed:ce5b]')
137-
expect(hosts[0][:scheme]).to eq('http')
138-
expect(hosts[0][:port]).to be(9200)
139-
end
140-
end
141-
142129
context 'when a path is specified' do
143130

144131
let(:host) do

0 commit comments

Comments
 (0)