From 15e7e472e65fd6110a42674f9e4ef73fd1f8bbdc Mon Sep 17 00:00:00 2001 From: nahi Date: Mon, 20 Jun 2011 06:48:40 +0000 Subject: * lib/webrick/cookie.rb (WEBrick::Cookie.parse): Revert r31228. r31228 was for allowing the 'Cookie:' header which did not have no SP after ';' for separating cookie-pairs but RFC6265 requires single SP after ';' there. We allow multiple SPs here for compatibility with older WEBrick version. * test/webrick/test_cookie.rb: Test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/webrick/cookie.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/webrick/cookie.rb b/lib/webrick/cookie.rb index eb3b63b006..814e6645a3 100644 --- a/lib/webrick/cookie.rb +++ b/lib/webrick/cookie.rb @@ -57,7 +57,7 @@ module WEBrick ret = [] cookie = nil ver = 0 - str.split(/[;,]\s*/).each{|x| + str.split(/[;,]\s+/).each{|x| key, val = x.split(/=/,2) val = val ? HTTPUtils::dequote(val) : "" case key -- cgit v1.2.3