lib/httpx/response/body.rb in httpx-1.0.0 vs lib/httpx/response/body.rb in httpx-1.0.1
- old
+ new
@@ -31,10 +31,10 @@
def write(chunk)
return if @state == :closed
@inflaters.reverse_each do |inflater|
chunk = inflater.call(chunk)
- end if @inflaters
+ end if @inflaters && !chunk.empty?
size = chunk.bytesize
@length += size
transition(:open)
@buffer.write(chunk)