mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* lib/xmlrpc/client.rb: fix cookie handling. [ruby-dev:34403]
* test/xmlrpc/test_cookie.rb: add a test for the above fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									5a4c8a1ad7
								
							
						
					
					
						commit
						17ea268764
					
				
					 3 changed files with 109 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -565,8 +565,13 @@ module XMLRPC
 | 
			
		|||
        raise "Wrong size. Was #{data.size}, should be #{expected}"
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      c = resp["Set-Cookie"]
 | 
			
		||||
      @cookie = c if c
 | 
			
		||||
      set_cookies = resp.get_fields("Set-Cookie")
 | 
			
		||||
      if set_cookies and !set_cookies.empty?
 | 
			
		||||
        @cookie = set_cookies.collect do |set_cookie|
 | 
			
		||||
          cookie = WEBrick::Cookie.parse_set_cookie(set_cookie)
 | 
			
		||||
          WEBrick::Cookie.new(cookie.name, cookie.value).to_s
 | 
			
		||||
        end.join("; ")
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      return data
 | 
			
		||||
    end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue