We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 23418c2 + f31bdcb commit efad822Copy full SHA for efad822
lib/prometheus/client/push.rb
@@ -66,9 +66,9 @@ def parse(url)
66
67
def build_path(job, instance)
68
if instance
69
- format(INSTANCE_PATH, URI.escape(job), URI.escape(instance))
+ format(INSTANCE_PATH, CGI::escape(job), CGI::escape(instance))
70
else
71
- format(PATH, URI.escape(job))
+ format(PATH, CGI::escape(job))
72
end
73
74
spec/prometheus/client/push_spec.rb
@@ -73,7 +73,7 @@
it 'escapes non-URL characters' do
push = Prometheus::Client::Push.new('bar job', 'foo <my instance>')
75
76
- expected = '/metrics/job/bar%20job/instance/foo%20%3Cmy%20instance%3E'
+ expected = '/metrics/job/bar+job/instance/foo+%3Cmy+instance%3E'
77
expect(push.path).to eql(expected)
78
79
0 commit comments