rack-ssl 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rack-ssl might be problematic. Click here for more details.
- data/lib/rack/ssl.rb +7 -1
- metadata +4 -4
data/lib/rack/ssl.rb
CHANGED
@@ -69,7 +69,13 @@ module Rack
|
|
69
69
|
|
70
70
|
def flag_cookies_as_secure!(headers)
|
71
71
|
if cookies = headers['Set-Cookie']
|
72
|
-
|
72
|
+
# Rack 1.1's set_cookie_header! will sometimes wrap
|
73
|
+
# Set-Cookie in an array
|
74
|
+
unless cookies.respond_to?(:to_ary)
|
75
|
+
cookies = cookies.split("\n")
|
76
|
+
end
|
77
|
+
|
78
|
+
headers['Set-Cookie'] = cookies.map { |cookie|
|
73
79
|
if cookie !~ /; secure(;|$)/
|
74
80
|
"#{cookie}; secure"
|
75
81
|
else
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-ssl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 2
|
10
|
+
version: 1.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joshua Peek
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-03-24 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|