protocol-rack 0.11.1 → 0.11.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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/protocol/rack/adapter/rack2.rb +7 -2
- data/lib/protocol/rack/adapter/rack3.rb +7 -2
- data/lib/protocol/rack/adapter/rack31.rb +12 -2
- data/lib/protocol/rack/version.rb +1 -1
- data/license.md +2 -1
- data/readme.md +10 -0
- data/releases.md +5 -0
- data.tar.gz.sig +0 -0
- metadata +5 -8
- 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: ab3e913313df25d3592761df42df6f1926fd901b3363ad7347db464599d1964e
|
4
|
+
data.tar.gz: a4610f7973026ecce482e3c97ee1622466a5f65f969f4b6378108fd6c98a4f33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a08d73c2dd4e1621693404a3b74c504981b42cd81a6e1bbaae0f44b1ab1bf7b47515f509d1a700afa4bdaa31edcb9b238007e24e7b5c398ea12cddf01430f79
|
7
|
+
data.tar.gz: 6e948ed04abe9047f51623ffd7a93846050088328696e75fefc2c3f358b5cf4f5333a410963af2f2a8a9e17948baecdd07d7c3c6ea2245557c39f60d35bb3ce5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -1,7 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2022-
|
4
|
+
# Copyright, 2022-2025, by Samuel Williams.
|
5
|
+
# Copyright, 2025, by Francisco Mejia.
|
5
6
|
|
6
7
|
require "console"
|
7
8
|
|
@@ -59,8 +60,12 @@ module Protocol
|
|
59
60
|
|
60
61
|
# I'm not sure what sane defaults should be here:
|
61
62
|
CGI::SERVER_NAME => server_name,
|
62
|
-
CGI::SERVER_PORT => server_port,
|
63
63
|
}
|
64
|
+
|
65
|
+
# SERVER_PORT is optional but must not be set if it is not present.
|
66
|
+
if server_port
|
67
|
+
env[CGI::SERVER_PORT] = server_port
|
68
|
+
end
|
64
69
|
|
65
70
|
self.unwrap_request(request, env)
|
66
71
|
|
@@ -1,7 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2022-
|
4
|
+
# Copyright, 2022-2025, by Samuel Williams.
|
5
|
+
# Copyright, 2025, by Francisco Mejia.
|
5
6
|
|
6
7
|
require "console"
|
7
8
|
|
@@ -55,8 +56,12 @@ module Protocol
|
|
55
56
|
|
56
57
|
# I'm not sure what sane defaults should be here:
|
57
58
|
CGI::SERVER_NAME => server_name,
|
58
|
-
CGI::SERVER_PORT => server_port,
|
59
59
|
}
|
60
|
+
|
61
|
+
# SERVER_PORT is optional but must not be set if it is not present.
|
62
|
+
if server_port
|
63
|
+
env[CGI::SERVER_PORT] = server_port
|
64
|
+
end
|
60
65
|
|
61
66
|
self.unwrap_request(request, env)
|
62
67
|
|
@@ -1,7 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright,
|
4
|
+
# Copyright, 2024-2025, by Samuel Williams.
|
5
|
+
# Copyright, 2025, by Francisco Mejia.
|
5
6
|
|
6
7
|
require "console"
|
7
8
|
|
@@ -46,8 +47,17 @@ module Protocol
|
|
46
47
|
|
47
48
|
# I'm not sure what sane defaults should be here:
|
48
49
|
CGI::SERVER_NAME => server_name,
|
49
|
-
CGI::SERVER_PORT => server_port,
|
50
50
|
}
|
51
|
+
|
52
|
+
# SERVER_PORT is optional but must not be set if it is not present.
|
53
|
+
if server_port
|
54
|
+
env[CGI::SERVER_PORT] = server_port
|
55
|
+
end
|
56
|
+
|
57
|
+
# The request protocol, either from the upgrade header or the HTTP/2 pseudo header of the same name.
|
58
|
+
if protocol = request.protocol
|
59
|
+
env[RACK_PROTOCOL] = protocol
|
60
|
+
end
|
51
61
|
|
52
62
|
if body = request.body
|
53
63
|
if body.empty?
|
data/license.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# MIT License
|
2
2
|
|
3
|
-
Copyright, 2022-
|
3
|
+
Copyright, 2022-2025, by Samuel Williams.
|
4
4
|
Copyright, 2023, by Genki Takiuchi.
|
5
|
+
Copyright, 2025, by Francisco Mejia.
|
5
6
|
|
6
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
8
|
of this software and associated documentation files (the "Software"), to deal
|
data/readme.md
CHANGED
@@ -11,6 +11,8 @@ Provides abstractions for working with the Rack specification on top of [`Protoc
|
|
11
11
|
|
12
12
|
## Usage
|
13
13
|
|
14
|
+
Please see the [project documentation](https://socketry.github.io/protocol-rack/) for more details.
|
15
|
+
|
14
16
|
### Application Adapter
|
15
17
|
|
16
18
|
Given a rack application, you can adapt it for use on `async-http`:
|
@@ -61,6 +63,14 @@ run proc{|env|
|
|
61
63
|
}
|
62
64
|
```
|
63
65
|
|
66
|
+
## Releases
|
67
|
+
|
68
|
+
Please see the [project releases](https://socketry.github.io/protocol-rack/releases/index) for all releases.
|
69
|
+
|
70
|
+
### v0.11.2
|
71
|
+
|
72
|
+
- Stop setting `env["SERVER_PORT"]` to `nil` if not present.
|
73
|
+
|
64
74
|
## Contributing
|
65
75
|
|
66
76
|
We welcome contributions to this project.
|
data/releases.md
ADDED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
+
- Francisco Mejia
|
8
9
|
- Genki Takiuchi
|
9
|
-
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain:
|
12
12
|
- |
|
@@ -38,7 +38,7 @@ cert_chain:
|
|
38
38
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
39
39
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
40
40
|
-----END CERTIFICATE-----
|
41
|
-
date:
|
41
|
+
date: 2025-02-28 00:00:00.000000000 Z
|
42
42
|
dependencies:
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: protocol-http
|
@@ -68,8 +68,6 @@ dependencies:
|
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '1.0'
|
71
|
-
description:
|
72
|
-
email:
|
73
71
|
executables: []
|
74
72
|
extensions: []
|
75
73
|
extra_rdoc_files: []
|
@@ -92,13 +90,13 @@ files:
|
|
92
90
|
- lib/protocol/rack/version.rb
|
93
91
|
- license.md
|
94
92
|
- readme.md
|
93
|
+
- releases.md
|
95
94
|
homepage: https://github.com/socketry/protocol-rack
|
96
95
|
licenses:
|
97
96
|
- MIT
|
98
97
|
metadata:
|
99
98
|
documentation_uri: https://socketry.github.io/protocol-rack/
|
100
99
|
source_code_uri: https://github.com/socketry/protocol-rack.git
|
101
|
-
post_install_message:
|
102
100
|
rdoc_options: []
|
103
101
|
require_paths:
|
104
102
|
- lib
|
@@ -113,8 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
111
|
- !ruby/object:Gem::Version
|
114
112
|
version: '0'
|
115
113
|
requirements: []
|
116
|
-
rubygems_version: 3.
|
117
|
-
signing_key:
|
114
|
+
rubygems_version: 3.6.2
|
118
115
|
specification_version: 4
|
119
116
|
summary: An implementation of the Rack protocol/specification.
|
120
117
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|