# File lib/httpclient/session.rb, line 584 def get_body(&block) begin read_header if @state == :META return nil if @state != :DATA if @chunked read_body_chunked(&block) elsif @content_length read_body_length(&block) else read_body_rest(&block) end rescue close raise end if eof? if @next_connection @state = :WAIT else close end end nil end