From 78779b3b780ef386f2e632f9480ba782a3afea17 Mon Sep 17 00:00:00 2001 From: Lukas Eklund Date: Tue, 26 Oct 2021 13:24:55 -0500 Subject: [PATCH] use URI.encode_www_form_component instead of URI.escape (obsolete) --- lib/nsq/discovery.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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