diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-12 11:19:18 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-12 11:19:18 +0000 |
commit | 007fb3b160d36f66427536150342640481dade3f (patch) | |
tree | 4bfef67424d858b3e0d3d8a0b099ef28ec741f67 | |
parent | 4e0685faeaba694641c30c5d93fd6be0e8b875f8 (diff) |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/xmlrpc/client.rb | 9 |
2 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,7 @@ +Wed Jun 12 20:18:03 2013 Kouhei Sutou <[email protected]> + + * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract. + Wed Jun 12 18:19:41 2013 Tanaka Akira <[email protected]> * bignum.c (validate_integer_pack_format): supported_flags argument @@ -71,7 +75,6 @@ Wed Jun 12 06:35:01 2013 Tanaka Akira <[email protected]> Wed Jun 12 00:07:46 2013 Kouhei Sutou <[email protected]> - * 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) |