We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ac961c commit 47c00d2Copy full SHA for 47c00d2
lib/protocol/http/cookie.rb
@@ -68,7 +68,7 @@ def to_s
68
def self.parse(string)
69
head, *directives = string.split(/\s*;\s*/)
70
71
- key, value = head.split('=')
+ key, value = head.split('=', 2)
72
directives = self.parse_directives(directives)
73
74
self.new(
spec/protocol/http/header/cookie_spec.rb
@@ -36,4 +36,15 @@
36
expect(session.directives).to include('secure')
37
end
38
39
+
40
+ context "session=123==; secure" do
41
+ it "has named cookie" do
42
+ expect(cookies).to include('session')
43
44
+ session = cookies['session']
45
+ expect(session).to have_attributes(name: 'session')
46
+ expect(session).to have_attributes(value: '123==')
47
+ expect(session.directives).to include('secure')
48
+ end
49
50
0 commit comments