puma 7.0.0 → 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 +18 -3
- 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/events.rb +15 -0
- data/lib/puma/request.rb +7 -1
- data/lib/puma/server.rb +3 -3
- data/lib/puma/thread_pool.rb +10 -0
- metadata +2 -2
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,4 +1,16 @@
|
|
1
|
-
## 7.0.
|
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
|
+
|
8
|
+
## 7.0.1 / 2025-09-06
|
9
|
+
|
10
|
+
* Bugfixes
|
11
|
+
* Add backward compatibility aliases for Events class methods ([#3725])
|
12
|
+
|
13
|
+
## 7.0.0 / 2025-09-03
|
2
14
|
|
3
15
|
* Breaking changes
|
4
16
|
* Set default `max_keep_alive` to 999 ([#3719])
|
@@ -30,7 +42,6 @@
|
|
30
42
|
* Feature/support custom logger with request logs ([#3140])
|
31
43
|
|
32
44
|
* Bugfixes
|
33
|
-
* Fixes a bug where triggering hooks in the ThreadPool fails ([#3716])
|
34
45
|
* Fix error_logger inproperly logging `env[QUERY_STRING]` ([#3713], [#3625])
|
35
46
|
* Fix handling of invalid Transfer-Encoding header errors ([#3702])
|
36
47
|
* Fix socket leak on monitor wakeup `NoMethodError` in `Reactor#select_loop` ([#3696], [#3695])
|
@@ -2215,6 +2226,11 @@ be added back in a future date when a java Puma::MiniSSL is added.
|
|
2215
2226
|
* Bugfixes
|
2216
2227
|
* Your bugfix goes here <Most recent on the top, like GitHub> (#Github Number)
|
2217
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"
|
2233
|
+
[#3725]:https://github.com/puma/puma/pull/3725 "PR by @tannakartikey, merged 2025-09-05"
|
2218
2234
|
[#3719]:https://github.com/puma/puma/pull/3719 "PR by @schneems, merged 2025-09-03"
|
2219
2235
|
[#3378]:https://github.com/puma/puma/pull/3378 "PR by @shayonj, merged 2025-08-19"
|
2220
2236
|
[#3377]:https://github.com/puma/puma/pull/3377 "PR by @joshuay03, merged 2025-08-12"
|
@@ -2229,7 +2245,6 @@ be added back in a future date when a java Puma::MiniSSL is added.
|
|
2229
2245
|
[#3101]:https://github.com/puma/puma/pull/3101 "PR by @ioquatix, merged 2025-08-25"
|
2230
2246
|
[#3681]:https://github.com/puma/puma/pull/3681 "PR by @byroot, merged 2025-08-15"
|
2231
2247
|
[#3140]:https://github.com/puma/puma/pull/3140 "PR by @phyzical, merged 2025-08-12"
|
2232
|
-
[#3716]:https://github.com/puma/puma/pull/3716 "PR by @yuki24, merged 2025-08-31"
|
2233
2248
|
[#3713]:https://github.com/puma/puma/pull/3713 "PR by @MSP-Greg, merged 2025-08-29"
|
2234
2249
|
[#3625]:https://github.com/puma/puma/pull/3625 "PR by @bhooshiek-narendiran, closed 2025-08-29"
|
2235
2250
|
[#3702]:https://github.com/puma/puma/pull/3702 "PR by @marshall-lee, merged 2025-08-25"
|
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/events.rb
CHANGED
@@ -42,6 +42,21 @@ module Puma
|
|
42
42
|
register(:after_stopped, &block)
|
43
43
|
end
|
44
44
|
|
45
|
+
def on_booted(&block)
|
46
|
+
Puma.deprecate_method_change :on_booted, __callee__, :after_booted
|
47
|
+
after_booted(&block)
|
48
|
+
end
|
49
|
+
|
50
|
+
def on_restart(&block)
|
51
|
+
Puma.deprecate_method_change :on_restart, __callee__, :before_restart
|
52
|
+
before_restart(&block)
|
53
|
+
end
|
54
|
+
|
55
|
+
def on_stopped(&block)
|
56
|
+
Puma.deprecate_method_change :on_stopped, __callee__, :after_stopped
|
57
|
+
after_stopped(&block)
|
58
|
+
end
|
59
|
+
|
45
60
|
def fire_after_booted!
|
46
61
|
fire(:after_booted)
|
47
62
|
end
|
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? ?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Phoenix
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
|
-
rubygems_version: 3.
|
148
|
+
rubygems_version: 3.6.9
|
149
149
|
specification_version: 4
|
150
150
|
summary: A Ruby/Rack web server built for parallelism.
|
151
151
|
test_files: []
|