diff --git a/lib/nsq/discovery.rb b/lib/nsq/discovery.rb index 2009b58..eba651d 100644 --- a/lib/nsq/discovery.rb +++ b/lib/nsq/discovery.rb @@ -70,7 +70,7 @@ def get_nsqds(lookupd, topic = nil) uri.query = "ts=#{Time.now.to_i}" if topic uri.path = '/lookup' - uri.query += "&topic=#{URI.escape(topic)}" + uri.query += "&topic=#{URI.encode_www_form_component(topic)}" else uri.path = '/nodes' end