lib/async/http/protocol/http11.rb in async-http-0.23.2 vs lib/async/http/protocol/http11.rb in async-http-0.23.3

- old
+ new

@@ -218,12 +218,12 @@ @stream.flush end def read_body(headers) - if headers['transfer-encoding'] == 'chunked' + if headers.delete('transfer-encoding') == 'chunked' return Body::Chunked.new(self) - elsif content_length = headers['content-length'] + elsif content_length = headers.delete('content-length') return Body::Fixed.new(@stream, Integer(content_length)) end end end end