rackup 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rackup/handler/webrick.rb +19 -11
- data/lib/rackup/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23caa71b03397adf9344168de947fca289d1e4df6c577678e8b7fc8285c522e9
|
4
|
+
data.tar.gz: e39027a50a3f54eb0928d6cef394f79cdd52c71da06854f2fcf5ba3a5722c083
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be73868bc8995d73ae90f9e70bc6b8141ff5b0c26276cfcb8c010376cf3b7bdfc97d3836afad0524de61cee8c9cb910f16806becae671569fbb3484702c84e6c
|
7
|
+
data.tar.gz: fdad77f1c5b70d027c67a893db852bb825631772854df4bfdfc08d3d5ab2a2c40212375bc318f276695ce659014b7f72a2c80d62b0c0c73a0f6069649f21c845
|
@@ -93,18 +93,26 @@ module Rackup
|
|
93
93
|
|
94
94
|
status, headers, body = @app.call(env)
|
95
95
|
begin
|
96
|
-
res.status = status
|
97
|
-
|
96
|
+
res.status = status
|
97
|
+
|
98
|
+
if value = headers[RACK_HIJACK]
|
99
|
+
io_lambda = value
|
100
|
+
elsif !body.respond_to?(:to_path) && !body.respond_to?(:each)
|
101
|
+
io_lambda = body
|
102
|
+
end
|
103
|
+
|
104
|
+
if value = headers.delete('set-cookie')
|
105
|
+
res.cookies.concat(Array(value))
|
106
|
+
end
|
107
|
+
|
98
108
|
headers.each { |key, value|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
res[key] = Array(value).join(", ")
|
107
|
-
end
|
109
|
+
# Skip keys starting with rack., per Rack SPEC
|
110
|
+
next if key.start_with?('rack.')
|
111
|
+
|
112
|
+
# Since WEBrick won't accept repeated headers,
|
113
|
+
# merge the values per RFC 1945 section 4.2.
|
114
|
+
value = value.join(", ") if Array === value
|
115
|
+
res[key] = value
|
108
116
|
}
|
109
117
|
|
110
118
|
if io_lambda
|
data/lib/rackup/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rackup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rack Contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|