Bug #5774

[PATCH] xmlrpc client handling cookies

Added by Roman Riha over 2 years ago. Updated 10 months ago.

[ruby-core:41711]
Status:Closed
Priority:Normal
Assignee:Kouhei Sutou
Category:lib
Target version:-
ruby -v:ruby 1.9.2p180 (2011-02-18) [i386-mingw32] Backport:

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.

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

Associated revisions

Revision 41285
Added by Kouhei Sutou 10 months ago

  • lib/xmlrpc/client.rb (XMLRPC::Client#parsesetcookies): Support multiple names in a response. [Bug #5774] Reported by Roman Riha. Thanks!!!
  • test/xmlrpc/testclient.rb (XMLRPC::ClientTest#testcookie_override): Add a test of the above case.

History

#1 Updated by Koichi Sasada about 2 years ago

  • Assignee set to Hiroshi Nakamura

#2 Updated by Shyouhei Urabe about 2 years ago

  • Status changed from Open to Assigned

#3 Updated by Zachary Scott 11 months ago

  • Assignee changed from Hiroshi Nakamura to Kouhei Sutou

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

#4 Updated by Kouhei Sutou 10 months ago

  • 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#parsesetcookies): Support multiple names in a response. [Bug #5774] Reported by Roman Riha. Thanks!!!
  • test/xmlrpc/testclient.rb (XMLRPC::ClientTest#testcookie_override): Add a test of the above case.

Also available in: Atom PDF