Project

General

Profile

Actions

Bug #5774

closed

[PATCH] xmlrpc client handling cookies

Bug #5774: [PATCH] xmlrpc client handling cookies

Added by romanr (Roman Riha) almost 14 years ago. Updated over 12 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
Backport:
[ruby-core:41711]

Description

=begin
xmlrpc client does not properly handle cookies. Firstly, they do not persist if server sets new cookies, secondly, if the server sets the same cookie more than once, the older cookies will not be overwritten.

For example this
Set-Cookie: foo=deleted
Set-Cookie: foo=bar
will set the cookie property to "foo=deleted; foo=bar", which is incorrect.

I wrote a patch, that handles both of these issues. However, the patch does not add method to delete cookies or reset the session, which might be useful.


Files

client.rb.patch (1.2 KB) client.rb.patch romanr (Roman Riha), 12/18/2011 12:55 PM

Updated by ko1 (Koichi Sasada) over 13 years ago Actions #1

  • Assignee set to nahi (Hiroshi Nakamura)

Updated by shyouhei (Shyouhei Urabe) over 13 years ago Actions #2

  • Status changed from Open to Assigned

Updated by zzak (zzak _) over 12 years ago Actions #3 [ruby-core:55287]

  • Assignee changed from nahi (Hiroshi Nakamura) to kou (Kouhei Sutou)

This was lib/xmlrpc/client.rb, please check it

Updated by kou (Kouhei Sutou) over 12 years ago Actions #4

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r41285.
Roman, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Support
    multiple names in a response. [ruby-core:41711] [Bug #5774]
    Reported by Roman Riha. Thanks!!!
  • test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_override):
    Add a test of the above case.
Actions

Also available in: PDF Atom