summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/xmlrpc/client.rb9
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 <kou@cozmixng.org>
+
+ * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.
+
Wed Jun 12 18:19:41 2013 Tanaka Akira <akr@fsij.org>
* bignum.c (validate_integer_pack_format): supported_flags argument
@@ -71,7 +75,6 @@ Wed Jun 12 06:35:01 2013 Tanaka Akira <akr@fsij.org>
Wed Jun 12 00:07:46 2013 Kouhei Sutou <kou@cozmixng.org>
- * 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)