lib/em-http/decoders.rb in em-http-request-1.1.4 vs lib/em-http/decoders.rb in em-http-request-1.1.5
- old
+ new
@@ -125,11 +125,10 @@
@pos >= @data.size
end
def extract_stream(compressed)
@data << compressed
- pos = @pos
while !eof? && !finished?
buffer = ""
case @state
@@ -206,10 +205,10 @@
end
end
end
if finished?
- compressed[(@pos - pos)..-1]
+ compressed[(@pos - (@data.length - compressed.length))..-1]
else
""
end
end
end