lib/opentelemetry/common/propagation/rack_env_getter.rb in opentelemetry-common-0.19.6 vs lib/opentelemetry/common/propagation/rack_env_getter.rb in opentelemetry-common-0.19.7
- old
+ new
@@ -27,18 +27,18 @@
end
private
def to_rack_key(key)
- ret = 'HTTP_' + key
+ ret = "HTTP_#{key}"
ret.tr!('-', '_')
ret.upcase!
ret
end
def from_rack_key(key)
start = key.start_with?('HTTP_') ? 5 : 0
- ret = key[start..-1]
+ ret = key[start..]
ret.tr!('_', '-')
ret.downcase!
ret
end
end