From 007fb3b160d36f66427536150342640481dade3f Mon Sep 17 00:00:00 2001 From: kou Date: Wed, 12 Jun 2013 11:19:18 +0000 Subject: * 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 --- ChangeLog | 5 ++++- lib/xmlrpc/client.rb | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c7e05bde1..56c494142a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Jun 12 20:18:03 2013 Kouhei Sutou + + * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract. + Wed Jun 12 18:19:41 2013 Tanaka Akira * bignum.c (validate_integer_pack_format): supported_flags argument @@ -71,7 +75,6 @@ Wed Jun 12 06:35:01 2013 Tanaka Akira Wed Jun 12 00:07:46 2013 Kouhei Sutou - * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract. * test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_simple): Add a test for the extracted method. diff --git a/lib/xmlrpc/client.rb b/lib/xmlrpc/client.rb index c1c2da054c..6a955cdc85 100644 --- a/lib/xmlrpc/client.rb +++ b/lib/xmlrpc/client.rb @@ -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) -- cgit v1.2.3