From 1cb8c0d6fe8cded70c10b501c8aa3f754c1b2a98 Mon Sep 17 00:00:00 2001 From: aamine Date: Mon, 12 Jun 2000 15:45:58 +0000 Subject: o http.rb: body is in HTTPResponse git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/net/http.rb') diff --git a/lib/net/http.rb b/lib/net/http.rb index 40025d06a5..d364237956 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -352,9 +352,11 @@ All "key" is case-insensitive. super( code_type, code, msg ) @data = {} @http_body_exist = bexist + @body = nil end attr_reader :http_body_exist + attr_accessor :body def []( key ) @data[ key.downcase ] @@ -523,6 +525,8 @@ All "key" is case-insensitive. end def get_body( resp, dest ) + resp.body = dest + if resp.http_body_exist then if chunked? resp then read_chunked( dest, resp ) -- cgit v1.2.3