lib/httpx/plugins/grpc/message.rb in httpx-0.22.5 vs lib/httpx/plugins/grpc/message.rb in httpx-0.23.0
- old
+ new
@@ -45,10 +45,12 @@
compressed, size = message.unpack("CL>")
data = message.byteslice(5..size + 5 - 1)
if compressed == 1
encodings.reverse_each do |algo|
- inflater = encoders.registry(algo).inflater(size)
+ next unless encoders.key?(algo)
+
+ inflater = encoders[algo].inflater(size)
data = inflater.inflate(data)
size = data.bytesize
end
end