protocol-rack 0.19.0 → 0.21.0
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -1
- data/lib/protocol/rack/adapter/generic.rb +4 -3
- data/lib/protocol/rack/input.rb +3 -8
- data/lib/protocol/rack/version.rb +1 -1
- data/license.md +1 -1
- data/readme.md +8 -4
- data/releases.md +8 -0
- data.tar.gz.sig +0 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e1d01285c37f91d697e015646a6ed3efecfe08c8db97d94c636e27cec44497be
|
|
4
|
+
data.tar.gz: 1f494626f6f7fb446dc23e37eadcc0e8fae493c2701dabc796d108342b8dba58
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7dc7cc8c0df3b688c30ee1b13a6e2178a84a0ea5bfc66e6e50af9b36c239224c94abe11237d2f5d6310df75eb08a56ff56787c39cb33aebd28c85808a6cadeea
|
|
7
|
+
data.tar.gz: c9865d6691c36ebc6d8c5d3614317256831b55718d6655f90cb0843c60bed0cc75e02c96dfdf6005c0637c3cd65c70368dbd69091df41d026e372c41cba38a4b
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Y�w
|
|
1
|
+
��b�7��h��������}jNWc�Ij�e�~X�Y����)�d�V����n�5\���Χ�>�"_�W�����'����r�V�,Lgx��w���]�:*�aN����l���KuJf����GС�m���L`N�F�k@0�W,�!
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
# Released under the MIT License.
|
|
4
|
-
# Copyright, 2022-
|
|
4
|
+
# Copyright, 2022-2026, by Samuel Williams.
|
|
5
5
|
|
|
6
6
|
require "console"
|
|
7
7
|
|
|
@@ -76,7 +76,7 @@ module Protocol
|
|
|
76
76
|
env[http_key] = "#{current_value},#{value}"
|
|
77
77
|
end
|
|
78
78
|
else
|
|
79
|
-
env[http_key] = value
|
|
79
|
+
env[http_key] = value.to_s
|
|
80
80
|
end
|
|
81
81
|
end
|
|
82
82
|
end
|
|
@@ -105,7 +105,8 @@ module Protocol
|
|
|
105
105
|
env[CGI::CONTENT_LENGTH] = length.to_s
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
# We ignore trailers for the purpose of constructing the rack environment:
|
|
109
|
+
self.unwrap_headers(request.headers.header, env)
|
|
109
110
|
|
|
110
111
|
# For the sake of compatibility, we set the `HTTP_UPGRADE` header to the requested protocol.
|
|
111
112
|
if protocol = request.protocol and request.version.start_with?("HTTP/1")
|
data/lib/protocol/rack/input.rb
CHANGED
|
@@ -89,7 +89,7 @@ module Protocol
|
|
|
89
89
|
# No-op.
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
-
def sysread(size, buffer
|
|
92
|
+
def sysread(size, buffer)
|
|
93
93
|
if @body
|
|
94
94
|
# User's may forget to call #close...
|
|
95
95
|
if chunk = @body.read
|
|
@@ -100,13 +100,8 @@ module Protocol
|
|
|
100
100
|
@closed = true
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
buffer.replace(chunk)
|
|
106
|
-
else
|
|
107
|
-
# Otherwise we return the chunk directly:
|
|
108
|
-
buffer = chunk
|
|
109
|
-
end
|
|
103
|
+
# The buffer is always provided, and we replace its contents:
|
|
104
|
+
buffer.replace(chunk)
|
|
110
105
|
|
|
111
106
|
return buffer
|
|
112
107
|
else
|
data/license.md
CHANGED
data/readme.md
CHANGED
|
@@ -21,6 +21,14 @@ Please see the [project documentation](https://socketry.github.io/protocol-rack/
|
|
|
21
21
|
|
|
22
22
|
Please see the [project releases](https://socketry.github.io/protocol-rack/releases/index) for all releases.
|
|
23
23
|
|
|
24
|
+
### v0.21.0
|
|
25
|
+
|
|
26
|
+
- For the purpose of constructing the rack request environment, trailers are ignored.
|
|
27
|
+
|
|
28
|
+
### v0.20.0
|
|
29
|
+
|
|
30
|
+
- Convert header values into strings using `to_s` so that `Headers#each` can yield non-string values if necessary.
|
|
31
|
+
|
|
24
32
|
### v0.19.0
|
|
25
33
|
|
|
26
34
|
- Use `Headers#add` instead of `Headers#[]=` in Rack3 and Rack31 adapters, which is the correct interface for appending headers.
|
|
@@ -56,10 +64,6 @@ Please see the [project releases](https://socketry.github.io/protocol-rack/relea
|
|
|
56
64
|
|
|
57
65
|
- Ignore (and close) response bodies for status codes that don't allow them.
|
|
58
66
|
|
|
59
|
-
### v0.11.2
|
|
60
|
-
|
|
61
|
-
- Stop setting `env["SERVER_PORT"]` to `nil` if not present.
|
|
62
|
-
|
|
63
67
|
## Contributing
|
|
64
68
|
|
|
65
69
|
We welcome contributions to this project.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.21.0
|
|
4
|
+
|
|
5
|
+
- For the purpose of constructing the rack request environment, trailers are ignored.
|
|
6
|
+
|
|
7
|
+
## v0.20.0
|
|
8
|
+
|
|
9
|
+
- Convert header values into strings using `to_s` so that `Headers#each` can yield non-string values if necessary.
|
|
10
|
+
|
|
3
11
|
## v0.19.0
|
|
4
12
|
|
|
5
13
|
- Use `Headers#add` instead of `Headers#[]=` in Rack3 and Rack31 adapters, which is the correct interface for appending headers.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: protocol-rack
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.21.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -60,14 +60,14 @@ dependencies:
|
|
|
60
60
|
requirements:
|
|
61
61
|
- - "~>"
|
|
62
62
|
- !ruby/object:Gem::Version
|
|
63
|
-
version: '0.
|
|
63
|
+
version: '0.58'
|
|
64
64
|
type: :runtime
|
|
65
65
|
prerelease: false
|
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
|
67
67
|
requirements:
|
|
68
68
|
- - "~>"
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
|
-
version: '0.
|
|
70
|
+
version: '0.58'
|
|
71
71
|
- !ruby/object:Gem::Dependency
|
|
72
72
|
name: rack
|
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
128
128
|
- !ruby/object:Gem::Version
|
|
129
129
|
version: '0'
|
|
130
130
|
requirements: []
|
|
131
|
-
rubygems_version:
|
|
131
|
+
rubygems_version: 4.0.3
|
|
132
132
|
specification_version: 4
|
|
133
133
|
summary: An implementation of the Rack protocol/specification.
|
|
134
134
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|