aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby
diff options
context:
space:
mode:
authorGravatar Tim Emiola <temiola@google.com>2015-02-25 11:49:34 -0800
committerGravatar Tim Emiola <temiola@google.com>2015-02-25 11:49:34 -0800
commit7708998b5a8018cbef7bd696563edc1e4aac210c (patch)
treedd51f6b463d4f318e69695ba6539607c081309cd /src/ruby
parent7ff92c84efdb6233f0af4cd501b3b09142ce33ae (diff)
Tmp fix: splits the hostname from the host before creating a call
Diffstat (limited to 'src/ruby')
-rw-r--r--src/ruby/lib/grpc/generic/client_stub.rb7
1 files changed, 6 insertions, 1 deletions
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