rackup 0.2.1 → 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/LICENSE.md +22 -0
- data/lib/rack/handler.rb +2 -0
- data/lib/rack/server.rb +2 -0
- data/lib/rackup/handler/webrick.rb +19 -11
- data/lib/rackup/version.rb +1 -1
- data/lib/rackup.rb +2 -0
- metadata +3 -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
|
data/LICENSE.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Released under the MIT license.
|
2
|
+
|
3
|
+
Copyright, 2007-2021, by [Leah Neukirchen](https://leahneukirchen.org).
|
4
|
+
Copyright, 2022, by [Samuel G. D. Williams](https://www.codeotaku.com).
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
8
|
+
in the Software without restriction, including without limitation the rights
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
11
|
+
furnished to do so, subject to the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
14
|
+
all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
THE SOFTWARE.
|
data/lib/rack/handler.rb
CHANGED
data/lib/rack/server.rb
CHANGED
@@ -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
data/lib/rackup.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
|
@@ -115,6 +115,7 @@ executables:
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
+
- LICENSE.md
|
118
119
|
- bin/rackup
|
119
120
|
- lib/rack/handler.rb
|
120
121
|
- lib/rack/server.rb
|