1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fri Apr 1 18:53:06 2011 NAKAMURA, Hiroshi <nahi@ruby-lang.org>

* lib/webrick/cookie.rb (WEBrick::Cookie.parse): 'white space is
          permitted between tokens' according to RFC2965. Though 'Netscape 
          spec' does not define the syntax clearly, make it tolerant as a 
          server. As a real-world example, rest-client gem sends
          'Cookie: foo=1;bar=2'

        * test/webrick/test_cookie.rb (test_parse_non_whitespace): test it. 


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nahi 2011-04-01 10:02:03 +00:00
parent 9d0fbe23b6
commit cc8bc6b7b6
3 changed files with 31 additions and 1 deletions

View file

@ -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