rackup 2.3.0 → 2.3.1
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
- data/lib/rackup/handler/webrick.rb +12 -4
- data/lib/rackup/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1e1f9c41ea38c6bde36ea2c4e61d66ffe4a61d2a92fe73bbbe4090d0adc3cad6
|
|
4
|
+
data.tar.gz: e08ff923a6568b6b30f5810cbfcfc046e536d944086e97960cf3869daaff0ae5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0fb28d087940a39f79a4bfa6749455c41bae3c48ec652b054c1fc99acf4b6176f892a7b6ffb300304ceb2bd5378f129c3793da08e507628f1acb02c31cf3d10c
|
|
7
|
+
data.tar.gz: 5ab015f40bd2f87d3ae8ae71afc10a567ce1d6cb4ed7be74b029f4f0e8ccaf7292a96df731e1b5b13f6ab45865b5a2bbe11ad32b47dc65bed7e058567e5a51b0
|
|
@@ -119,12 +119,20 @@ module Rackup
|
|
|
119
119
|
if req.unparsed_uri == "*"
|
|
120
120
|
env[::Rack::PATH_INFO] = "*"
|
|
121
121
|
env[::Rack::REQUEST_PATH] = "*"
|
|
122
|
-
|
|
123
|
-
# Ensure SERVER_NAME and SERVER_PORT are set from server config
|
|
122
|
+
|
|
123
|
+
# Ensure SERVER_NAME and SERVER_PORT are set from server config.
|
|
124
124
|
# (WEBrick allows these to be nil for OPTIONS * requests)
|
|
125
125
|
# See https://github.com/ruby/webrick/pull/182 for a proper fix.
|
|
126
|
-
env[::Rack::SERVER_NAME]
|
|
127
|
-
|
|
126
|
+
server_name = env[::Rack::SERVER_NAME]
|
|
127
|
+
if server_name.nil? || server_name == ""
|
|
128
|
+
env[::Rack::SERVER_NAME] = @server[:ServerName] || @server[:BindAddress] || "localhost"
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Legacy versions of WEBrick can set server_port to "" in some cases:
|
|
132
|
+
server_port = env[::Rack::SERVER_PORT]
|
|
133
|
+
if server_port.nil? || server_port == ""
|
|
134
|
+
env[::Rack::SERVER_PORT] = (@server[:Port] || 80).to_s
|
|
135
|
+
end
|
|
128
136
|
else
|
|
129
137
|
unless env[::Rack::PATH_INFO] == ""
|
|
130
138
|
# Strip the script name prefix from the path to get path info
|
data/lib/rackup/version.rb
CHANGED