From 7708998b5a8018cbef7bd696563edc1e4aac210c Mon Sep 17 00:00:00 2001 From: Tim Emiola <temiola@google.com> Date: Wed, 25 Feb 2015 11:49:34 -0800 Subject: [PATCH] Tmp fix: splits the hostname from the host before creating a call --- src/ruby/lib/grpc/generic/client_stub.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ruby/lib/grpc/generic/client_stub.rb b/src/ruby/lib/grpc/generic/client_stub.rb index 7fc0d83501..f234984eec 100644 --- a/src/ruby/lib/grpc/generic/client_stub.rb +++ b/src/ruby/lib/grpc/generic/client_stub.rb @@ -400,7 +400,12 @@ module GRPC # @param deadline [TimeConst] def new_active_call(ch, marshal, unmarshal, deadline = nil) absolute_deadline = Core::TimeConsts.from_relative_time(deadline) - call = @ch.create_call(ch, @host, absolute_deadline) + # It should be OK to to pass the hostname:port to create_call, but at + # the moment this fails a security check. This will be corrected. + # + # TODO: # remove this after create_call is updated + host = @host.split(':')[0] + call = @ch.create_call(ch, host, absolute_deadline) ActiveCall.new(call, @queue, marshal, unmarshal, absolute_deadline, started: false) end -- GitLab