mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
o http.rb: body is in HTTPResponse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c86f2148a2
commit
1cb8c0d6fe
2 changed files with 5 additions and 1 deletions
|
@ -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 )
|
||||
|
|
|
@ -68,7 +68,7 @@ Object
|
|||
|
||||
class Protocol
|
||||
|
||||
Version = '1.1.21'
|
||||
Version = '1.1.22'
|
||||
|
||||
class << self
|
||||
|
||||
|
|
Loading…
Reference in a new issue