puma 7.0.1 → 7.0.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
- data/History.md +11 -0
- data/lib/puma/cluster/worker_handle.rb +2 -0
- data/lib/puma/const.rb +1 -1
- data/lib/puma/control_cli.rb +3 -0
- data/lib/puma/request.rb +7 -1
- data/lib/puma/server.rb +3 -3
- data/lib/puma/thread_pool.rb +10 -0
- 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: 27238c0a5b2fe438167c0f56d89da2bded024ea017cdb903be3517cab2e826b6
|
4
|
+
data.tar.gz: d18f43c13332384208ea7e941e8ff01f6fdbd2ff74b36b978200737b4b8ac125
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5381aede9f16b8bb80d8f45ce6c892ee337b1ce9528a9073bf3a0369bd86f475eab5e3c77e3f217e082939d2fdc680bed9fd44ff9e817b5c0d3bfd8ee74be810
|
7
|
+
data.tar.gz: 588e29319e59120aa21853ccd88e9ecec589cd488e6284e6fe8d036d363fa77e8bc5997e70f1d9d7b07ba02b9735bee70873bf7b1b454f07475aaa374ebd96af
|
data/History.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 7.0.2 / 2025-09-08
|
2
|
+
|
3
|
+
* Bugfixes
|
4
|
+
* bug: control_cli.rb - Fixup `pumactl` code to load puma.rb for `deprecate_method_change` ([#3736], [#3734])
|
5
|
+
* Replace sleep spin lock with condition variable ([#3729])
|
6
|
+
* Fix Puma not booting if queue_requests disabled ([#3731])
|
7
|
+
|
1
8
|
## 7.0.1 / 2025-09-06
|
2
9
|
|
3
10
|
* Bugfixes
|
@@ -2219,6 +2226,10 @@ be added back in a future date when a java Puma::MiniSSL is added.
|
|
2219
2226
|
* Bugfixes
|
2220
2227
|
* Your bugfix goes here <Most recent on the top, like GitHub> (#Github Number)
|
2221
2228
|
|
2229
|
+
[#3736]:https://github.com/puma/puma/pull/3736 "PR by @MSP-Greg, merged 2025-09-08"
|
2230
|
+
[#3734]:https://github.com/puma/puma/issues/3734 "Issue by @espen, closed 2025-09-08"
|
2231
|
+
[#3729]:https://github.com/puma/puma/pull/3729 "PR by @bensheldon, merged 2025-09-08"
|
2232
|
+
[#3731]:https://github.com/puma/puma/pull/3731 "PR by @stanhu, merged 2025-09-06"
|
2222
2233
|
[#3725]:https://github.com/puma/puma/pull/3725 "PR by @tannakartikey, merged 2025-09-05"
|
2223
2234
|
[#3719]:https://github.com/puma/puma/pull/3719 "PR by @schneems, merged 2025-09-03"
|
2224
2235
|
[#3378]:https://github.com/puma/puma/pull/3378 "PR by @shayonj, merged 2025-08-19"
|
data/lib/puma/const.rb
CHANGED
@@ -100,7 +100,7 @@ module Puma
|
|
100
100
|
# too taxing on performance.
|
101
101
|
module Const
|
102
102
|
|
103
|
-
PUMA_VERSION = VERSION = "7.0.
|
103
|
+
PUMA_VERSION = VERSION = "7.0.2"
|
104
104
|
CODE_NAME = "Romantic Warrior"
|
105
105
|
|
106
106
|
PUMA_SERVER_STRING = ["puma", PUMA_VERSION, CODE_NAME].join(" ").freeze
|
data/lib/puma/control_cli.rb
CHANGED
data/lib/puma/request.rb
CHANGED
@@ -273,11 +273,17 @@ module Puma
|
|
273
273
|
!shutting_down? && keep_alive
|
274
274
|
end
|
275
275
|
|
276
|
+
HTTP_ON_VALUES = { "on" => true, HTTPS => true }
|
277
|
+
private_constant :HTTP_ON_VALUES
|
278
|
+
|
276
279
|
# @param env [Hash] see Puma::Client#env, from request
|
277
280
|
# @return [Puma::Const::PORT_443,Puma::Const::PORT_80]
|
278
281
|
#
|
279
282
|
def default_server_port(env)
|
280
|
-
if [
|
283
|
+
if HTTP_ON_VALUES[env[HTTPS_KEY]] ||
|
284
|
+
env[HTTP_X_FORWARDED_PROTO]&.start_with?(HTTPS) ||
|
285
|
+
env[HTTP_X_FORWARDED_SCHEME] == HTTPS ||
|
286
|
+
env[HTTP_X_FORWARDED_SSL] == "on"
|
281
287
|
PORT_443
|
282
288
|
else
|
283
289
|
PORT_80
|
data/lib/puma/server.rb
CHANGED
@@ -382,7 +382,7 @@ module Puma
|
|
382
382
|
else
|
383
383
|
# if ThreadPool out_of_band code is running, we don't want to add
|
384
384
|
# clients until the code is finished.
|
385
|
-
|
385
|
+
pool.wait_while_out_of_band_running
|
386
386
|
|
387
387
|
# only use delay when clustered and busy
|
388
388
|
if pool.busy_threads >= @max_threads
|
@@ -685,13 +685,13 @@ module Puma
|
|
685
685
|
stats = @thread_pool&.stats || {}
|
686
686
|
stats[:max_threads] = @max_threads
|
687
687
|
stats[:requests_count] = @requests_count
|
688
|
-
stats[:reactor_max] = @reactor.reactor_max
|
688
|
+
stats[:reactor_max] = @reactor.reactor_max if @reactor
|
689
689
|
reset_max
|
690
690
|
stats
|
691
691
|
end
|
692
692
|
|
693
693
|
def reset_max
|
694
|
-
@reactor.reactor_max = 0
|
694
|
+
@reactor.reactor_max = 0 if @reactor
|
695
695
|
@thread_pool.reset_max
|
696
696
|
end
|
697
697
|
|
data/lib/puma/thread_pool.rb
CHANGED
@@ -53,6 +53,7 @@ module Puma
|
|
53
53
|
@block = block
|
54
54
|
@out_of_band = options[:out_of_band]
|
55
55
|
@out_of_band_running = false
|
56
|
+
@out_of_band_condvar = ConditionVariable.new
|
56
57
|
@before_thread_start = options[:before_thread_start]
|
57
58
|
@before_thread_exit = options[:before_thread_exit]
|
58
59
|
@reaping_time = options[:reaping_time]
|
@@ -227,10 +228,19 @@ module Puma
|
|
227
228
|
true
|
228
229
|
ensure
|
229
230
|
@out_of_band_running = false
|
231
|
+
@out_of_band_condvar.broadcast
|
230
232
|
end
|
231
233
|
|
232
234
|
private :trigger_out_of_band_hook
|
233
235
|
|
236
|
+
def wait_while_out_of_band_running
|
237
|
+
return unless @out_of_band_running
|
238
|
+
|
239
|
+
with_mutex do
|
240
|
+
@out_of_band_condvar.wait(@mutex) while @out_of_band_running
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
234
244
|
# @version 5.0.0
|
235
245
|
def with_mutex(&block)
|
236
246
|
@mutex.owned? ?
|