mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.
Sorry for forgetting it in r41236. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4e0685faea
commit
007fb3b160
2 changed files with 10 additions and 4 deletions
|
@ -506,7 +506,12 @@ module XMLRPC # :nodoc:
|
|||
raise "Wrong size. Was #{data.bytesize}, should be #{expected}"
|
||||
end
|
||||
|
||||
set_cookies = resp.get_fields("Set-Cookie")
|
||||
parse_set_cookies(resp.get_fields("Set-Cookie"))
|
||||
|
||||
return data
|
||||
end
|
||||
|
||||
def parse_set_cookies(set_cookies)
|
||||
if set_cookies and !set_cookies.empty?
|
||||
require 'webrick/cookie'
|
||||
@cookie = set_cookies.collect do |set_cookie|
|
||||
|
@ -514,8 +519,6 @@ module XMLRPC # :nodoc:
|
|||
WEBrick::Cookie.new(cookie.name, cookie.value).to_s
|
||||
end.join("; ")
|
||||
end
|
||||
|
||||
return data
|
||||
end
|
||||
|
||||
def gen_multicall(methods=[], async=false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue