puma 5.0.3-java → 5.2.1-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puma might be problematic. Click here for more details.

Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/History.md +110 -40
  3. data/README.md +48 -18
  4. data/docs/compile_options.md +19 -0
  5. data/docs/deployment.md +1 -1
  6. data/docs/fork_worker.md +2 -0
  7. data/docs/kubernetes.md +66 -0
  8. data/docs/plugins.md +1 -1
  9. data/docs/rails_dev_mode.md +29 -0
  10. data/docs/stats.md +142 -0
  11. data/docs/systemd.md +24 -2
  12. data/ext/puma_http11/extconf.rb +18 -5
  13. data/ext/puma_http11/http11_parser.c +45 -47
  14. data/ext/puma_http11/http11_parser.java.rl +1 -1
  15. data/ext/puma_http11/http11_parser.rl +1 -1
  16. data/ext/puma_http11/mini_ssl.c +162 -84
  17. data/ext/puma_http11/org/jruby/puma/Http11Parser.java +5 -7
  18. data/ext/puma_http11/puma_http11.c +8 -2
  19. data/lib/puma.rb +20 -10
  20. data/lib/puma/app/status.rb +4 -7
  21. data/lib/puma/binder.rb +60 -24
  22. data/lib/puma/cli.rb +4 -0
  23. data/lib/puma/client.rb +4 -9
  24. data/lib/puma/cluster.rb +13 -7
  25. data/lib/puma/cluster/worker.rb +8 -2
  26. data/lib/puma/cluster/worker_handle.rb +5 -2
  27. data/lib/puma/configuration.rb +13 -1
  28. data/lib/puma/const.rb +11 -3
  29. data/lib/puma/control_cli.rb +73 -70
  30. data/lib/puma/detect.rb +14 -10
  31. data/lib/puma/dsl.rb +100 -22
  32. data/lib/puma/error_logger.rb +10 -3
  33. data/lib/puma/events.rb +18 -3
  34. data/lib/puma/json.rb +96 -0
  35. data/lib/puma/launcher.rb +52 -6
  36. data/lib/puma/minissl.rb +48 -17
  37. data/lib/puma/minissl/context_builder.rb +6 -0
  38. data/lib/puma/null_io.rb +4 -0
  39. data/lib/puma/puma_http11.jar +0 -0
  40. data/lib/puma/reactor.rb +19 -12
  41. data/lib/puma/request.rb +20 -7
  42. data/lib/puma/runner.rb +14 -7
  43. data/lib/puma/server.rb +20 -75
  44. data/lib/puma/state_file.rb +5 -3
  45. data/lib/puma/systemd.rb +46 -0
  46. data/lib/rack/handler/puma.rb +1 -0
  47. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4af95359f9391a0466a24c2322f7bf9eb659a55e2224a40859997788312c2c7
4
- data.tar.gz: 2aded26c06eeb4666121ffb95490bfba84afdeba51aa6a8aa8a2037bf5ec3a7b
3
+ metadata.gz: 499a594786c4be683329a79dc8efe90b794c8bccf87863a9389e0bfea4cb647d
4
+ data.tar.gz: 9e5cfe53997edadbabda41bc3e16299bf371f1e009bd8162a3685cb34d97f9fc
5
5
  SHA512:
6
- metadata.gz: ad30f6d29a968120aa3c093acc3a7818b278a133f23a1450762f9f8c157732ce9b7bf113ffa30dc1f0d2fc0bb5248d8d4ab7711d6e7a0ba4d58e716767a8677e
7
- data.tar.gz: b998815c4886d8300ea5acc3ebaf5a5fbac41a662014ddb2d7f75ea971a2023589dbbe1f0bceddd156273c403b7b9024b4c0ee4a8988d644da9d66ceff04bafe
6
+ metadata.gz: f7000c30aae715931f59933c43e8cfe76aa86e8d35d9b76911e96da1ec30841546ed6c3fbe0d0aa50637f0355d2761896b1aa7df2b529acf0b61eb3eb30c30df
7
+ data.tar.gz: 0e83d2d9e079bfed5217f27a0755b2e72ee51b08a1066b5c2b0abf94bf36ec0a94adf5fba9a691e84cab07588d72695129c0cbc6c22e486b2b0651e415544707
data/History.md CHANGED
@@ -1,10 +1,72 @@
1
+ ## 5.2.1 / 2021-02-05
2
+
3
+ * Bugfixes
4
+ * Fix TCP cork/uncork operations to work with ssl clients ([#2550])
5
+ * Require rack/common_logger explicitly if :verbose is true ([#2547])
6
+ * MiniSSL::Socket#write - use data.byteslice(wrote..-1) ([#2543])
7
+ * Set `@env[CONTENT_LENGTH]` value as string. ([#2549])
8
+
9
+ ## 5.2.0 / 2021-01-27
10
+
11
+ * Features
12
+ * 10x latency improvement for MRI on ssl connections by reducing overhead ([#2519])
13
+ * Add option to specify the desired IO selector backend for libev ([#2522])
14
+ * Add ability to set OpenSSL verification flags (MRI only) ([#2490])
15
+ * Uses `flush` after writing messages to avoid mutating $stdout and $stderr using `sync=true` ([#2486])
16
+
17
+ * Bugfixes
18
+ * MiniSSL - Update dhparam to 2048 bit for use with SSL_CTX_set_tmp_dh ([#2535])
19
+ * Change 'Goodbye!' message to be output after listeners are closed ([#2529])
20
+ * Fix ssl bind logging with 0.0.0.0 and localhost ([#2533])
21
+ * Fix compiler warnings, but skipped warnings related to ragel state machine generated code ([#1953])
22
+ * Fix phased restart errors related to nio4r gem when using the Puma control server ([#2516])
23
+ * Add `#string` method to `Puma::NullIO` ([#2520])
24
+ * Fix binding via Rack handler to IPv6 addresses ([#2521])
25
+
26
+ * Refactor
27
+ * Refactor MiniSSL::Context on MRI, fix MiniSSL::Socket#write ([#2519])
28
+ * Remove `Server#read_body` ([#2531])
29
+ * Fail build if compiling extensions raises warnings on GH Actions, configurable via `MAKE_WARNINGS_INTO_ERRORS` ([#1953])
30
+
31
+ ## 5.1.1 / 2020-12-10
32
+
33
+ * Bugfixes
34
+ * Fix over eager matching against banned header names ([#2510])
35
+
36
+ ## 5.1.0 / 2020-11-30
37
+
38
+ * Features
39
+ * Phased restart availability is now always logged, even if it is not available.
40
+ * Prints the loaded configuration if the environment variable `PUMA_LOG_CONFIG` is present ([#2472])
41
+ * Integrate with systemd's watchdog and notification features ([#2438])
42
+ * Adds max_fast_inline as a configuration option for the Server object ([#2406])
43
+ * You can now fork workers from worker 0 using SIGURG w/o fork_worker enabled [#2449]
44
+ * Add option to bind to systemd activated sockets ([#2362])
45
+ * Add compile option to change the `QUERY_STRING` max length ([#2485])
46
+
47
+ * Bugfixes
48
+ * Fix JRuby handling in Puma::DSL#ssl_bind ([#2489])
49
+ * control_cli.rb - all normal output should be to @stdout ([#2487])
50
+ * Catch 'Error in reactor loop escaped: mode not supported for this object: r' ([#2477])
51
+ * Ignore Rails' reaper thread (and any thread marked forksafe) for warning ([#2475])
52
+ * Ignore illegal (by Rack spec) response header ([#2439])
53
+ * Close idle connections immediately on shutdown ([#2460])
54
+ * Fix some instances of phased restart errors related to the `json` gem ([#2473])
55
+ * Remove use of `json` gem to fix phased restart errors ([#2479])
56
+ * Fix grouping regexp of ILLEGAL_HEADER_KEY_REGEX ([#2495])
57
+
58
+ ## 5.0.4 / 2020-10-27
59
+
60
+ * Bugfixes
61
+ * Pass preloaded application into new workers if available when using `preload_app` ([#2461], [#2454])
62
+
1
63
  ## 5.0.3 / 2020-10-26
2
64
 
3
65
  * Bugfixes
4
66
  * Add Client#io_ok?, check before Reactor#register ([#2432])
5
67
  * Fix hang on shutdown in refork ([#2442])
6
68
  * Fix `Bundler::GemNotFound` errors for `nio4r` gem during phased restarts ([#2427], [#2018])
7
- * Server run thread safety fix ([#2435])
69
+ * Server run thread safety fix ([#2435])
8
70
  * Fire `on_booted` after server starts ([#2431], [#2212])
9
71
  * Cleanup daemonization in rc.d script ([#2409])
10
72
 
@@ -16,11 +78,12 @@
16
78
  * client.rb - remove JRuby specific 'finish' code ([#2412])
17
79
  * Consolidate fast_write calls in Server, extract early_hints assembly ([#2405])
18
80
  * Remove upstart from docs ([#2408])
81
+ * Extract worker process into separate class ([#2374])
19
82
  * Consolidate option handling in Server, Server small refactors, doc changes ([#2389])
20
83
 
21
84
  ## 5.0.2 / 2020-09-28
22
85
 
23
- * Bugfixes
86
+ * Bugfixes
24
87
  * Reverted API changes to Server.
25
88
 
26
89
  ## 5.0.1 / 2020-09-28
@@ -59,13 +122,13 @@
59
122
  * min_threads now set by environment variables PUMA_MIN_THREADS and MIN_THREADS. ([#2143])
60
123
  * max_threads now set by environment variables PUMA_MAX_THREADS and MAX_THREADS. ([#2143])
61
124
  * max_threads default to 5 in MRI or 16 for all other interpreters. ([#2143])
62
- * preload by default if workers > 1 ([#2143])
125
+ * `preload_app!` is on by default if number of workers > 1 and set via `WEB_CONCURRENCY` ([#2143])
63
126
  * Puma::Plugin.workers_supported? has been removed. Use Puma.forkable? instead. ([#2143])
64
127
  * `tcp_mode` has been removed without replacement. ([#2169])
65
128
  * Daemonization has been removed without replacement. ([#2170])
66
129
  * Changed #connected_port to #connected_ports ([#2076])
67
130
  * Configuration: `environment` is read from `RAILS_ENV`, if `RACK_ENV` can't be found ([#2022])
68
- * Log binding on http:// for TCP bindings to make it clickable
131
+ * Log binding on http:// for TCP bindings to make it clickable ([#2300])
69
132
 
70
133
  * Bugfixes
71
134
  * Fix JSON loading issues on phased-restarts ([#2269])
@@ -111,6 +174,11 @@
111
174
  * Support parallel tests in verbose progress reporting ([#2223])
112
175
  * Refactor error handling in server accept loop ([#2239])
113
176
 
177
+ ## 4.3.7 / 2020-11-30
178
+
179
+ * Bugfixes
180
+ * Backport set CONTENT_LENGTH for chunked requests (Originally: [#2287], backport: [#2496])
181
+
114
182
  ## 4.3.6 / 2020-09-05
115
183
 
116
184
  * Bugfixes
@@ -1634,6 +1702,40 @@ be added back in a future date when a java Puma::MiniSSL is added.
1634
1702
  * Bugfixes
1635
1703
  * Your bugfix goes here <Most recent on the top, like GitHub> (#Github Number)
1636
1704
 
1705
+ [#2550]:https://github.com/puma/puma/pull/2550 "PR by @MSP-Greg, merged 2021-02-05"
1706
+ [#2547]:https://github.com/puma/puma/pull/2547 "PR by @wildmaples, merged 2021-02-03"
1707
+ [#2543]:https://github.com/puma/puma/pull/2543 "PR by @MSP-Greg, merged 2021-02-01"
1708
+ [#2549]:https://github.com/puma/puma/pull/2549 "PR by @nmb, merged 2021-02-04"
1709
+ [#2519]:https://github.com/puma/puma/pull/2519 "PR by @MSP-Greg, merged 2021-01-26"
1710
+ [#2522]:https://github.com/puma/puma/pull/2522 "PR by @jcmfernandes, merged 2021-01-12"
1711
+ [#2490]:https://github.com/puma/puma/pull/2490 "PR by @Bonias, merged 2020-12-07"
1712
+ [#2486]:https://github.com/puma/puma/pull/2486 "PR by @ccverak, merged 2020-12-02"
1713
+ [#2535]:https://github.com/puma/puma/pull/2535 "PR by @MSP-Greg, merged 2021-01-27"
1714
+ [#2529]:https://github.com/puma/puma/pull/2529 "PR by @MSP-Greg, merged 2021-01-24"
1715
+ [#2533]:https://github.com/puma/puma/pull/2533 "PR by @MSP-Greg, merged 2021-01-24"
1716
+ [#1953]:https://github.com/puma/puma/issues/1953 "Issue by @nateberkopec, closed 2020-12-01"
1717
+ [#2516]:https://github.com/puma/puma/pull/2516 "PR by @cjlarose, merged 2020-12-17"
1718
+ [#2520]:https://github.com/puma/puma/pull/2520 "PR by @dentarg, merged 2021-01-04"
1719
+ [#2521]:https://github.com/puma/puma/pull/2521 "PR by @ojab, merged 2021-01-04"
1720
+ [#2531]:https://github.com/puma/puma/pull/2531 "PR by @wjordan, merged 2021-01-19"
1721
+ [#2510]:https://github.com/puma/puma/pull/2510 "PR by @micke, merged 2020-12-10"
1722
+ [#2472]:https://github.com/puma/puma/pull/2472 "PR by @ccverak, merged 2020-11-02"
1723
+ [#2438]:https://github.com/puma/puma/pull/2438 "PR by @ekohl, merged 2020-10-26"
1724
+ [#2406]:https://github.com/puma/puma/pull/2406 "PR by @fdel15, merged 2020-10-19"
1725
+ [#2449]:https://github.com/puma/puma/pull/2449 "PR by @MSP-Greg, merged 2020-10-28"
1726
+ [#2362]:https://github.com/puma/puma/pull/2362 "PR by @ekohl, merged 2020-11-10"
1727
+ [#2485]:https://github.com/puma/puma/pull/2485 "PR by @elct9620, merged 2020-11-18"
1728
+ [#2489]:https://github.com/puma/puma/pull/2489 "PR by @MSP-Greg, merged 2020-11-27"
1729
+ [#2487]:https://github.com/puma/puma/pull/2487 "PR by @MSP-Greg, merged 2020-11-17"
1730
+ [#2477]:https://github.com/puma/puma/pull/2477 "PR by @MSP-Greg, merged 2020-11-16"
1731
+ [#2475]:https://github.com/puma/puma/pull/2475 "PR by @nateberkopec, merged 2020-11-02"
1732
+ [#2439]:https://github.com/puma/puma/pull/2439 "PR by @kuei0221, merged 2020-10-26"
1733
+ [#2460]:https://github.com/puma/puma/pull/2460 "PR by @cjlarose, merged 2020-10-27"
1734
+ [#2473]:https://github.com/puma/puma/pull/2473 "PR by @cjlarose, merged 2020-11-01"
1735
+ [#2479]:https://github.com/puma/puma/pull/2479 "PR by @cjlarose, merged 2020-11-10"
1736
+ [#2495]:https://github.com/puma/puma/pull/2495 "PR by @JuanitoFatas, merged 2020-11-27"
1737
+ [#2461]:https://github.com/puma/puma/pull/2461 "PR by @cjlarose, merged 2020-10-27"
1738
+ [#2454]:https://github.com/puma/puma/issues/2454 "Issue by @majksner, closed 2020-10-27"
1637
1739
  [#2432]:https://github.com/puma/puma/pull/2432 "PR by @MSP-Greg, merged 2020-10-25"
1638
1740
  [#2442]:https://github.com/puma/puma/pull/2442 "PR by @wjordan, merged 2020-10-22"
1639
1741
  [#2427]:https://github.com/puma/puma/pull/2427 "PR by @cjlarose, merged 2020-10-20"
@@ -1649,22 +1751,7 @@ be added back in a future date when a java Puma::MiniSSL is added.
1649
1751
  [#2412]:https://github.com/puma/puma/pull/2412 "PR by @MSP-Greg, merged 2020-10-06"
1650
1752
  [#2405]:https://github.com/puma/puma/pull/2405 "PR by @MSP-Greg, merged 2020-10-05"
1651
1753
  [#2408]:https://github.com/puma/puma/pull/2408 "PR by @fliiiix, merged 2020-10-03"
1652
- [#2389]:https://github.com/puma/puma/pull/2389 "PR by @MSP-Greg, merged 2020-09-29"
1653
- [#2432]:https://github.com/puma/puma/pull/2432 "PR by @MSP-Greg, merged 2020-10-25"
1654
- [#2442]:https://github.com/puma/puma/pull/2442 "PR by @wjordan, merged 2020-10-22"
1655
- [#2427]:https://github.com/puma/puma/pull/2427 "PR by @cjlarose, merged 2020-10-20"
1656
- [#2018]:https://github.com/puma/puma/issues/2018 "Issue by @gingerlime, closed 2020-10-20"
1657
- [#2435]:https://github.com/puma/puma/pull/2435 "PR by @wjordan, merged 2020-10-20"
1658
- [#2431]:https://github.com/puma/puma/pull/2431 "PR by @wjordan, merged 2020-10-16"
1659
- [#2212]:https://github.com/puma/puma/issues/2212 "Issue by @junaruga, closed 2020-10-16"
1660
- [#2409]:https://github.com/puma/puma/pull/2409 "PR by @fliiiix, merged 2020-10-03"
1661
- [#2448]:https://github.com/puma/puma/pull/2448 "PR by @MSP-Greg, merged 2020-10-25"
1662
- [#2450]:https://github.com/puma/puma/pull/2450 "PR by @MSP-Greg, merged 2020-10-25"
1663
- [#2419]:https://github.com/puma/puma/pull/2419 "PR by @MSP-Greg, merged 2020-10-09"
1664
- [#2279]:https://github.com/puma/puma/pull/2279 "PR by @wjordan, merged 2020-10-06"
1665
- [#2412]:https://github.com/puma/puma/pull/2412 "PR by @MSP-Greg, merged 2020-10-06"
1666
- [#2405]:https://github.com/puma/puma/pull/2405 "PR by @MSP-Greg, merged 2020-10-05"
1667
- [#2408]:https://github.com/puma/puma/pull/2408 "PR by @fliiiix, merged 2020-10-03"
1754
+ [#2374]:https://github.com/puma/puma/pull/2374 "PR by @cjlarose, merged 2020-09-29"
1668
1755
  [#2389]:https://github.com/puma/puma/pull/2389 "PR by @MSP-Greg, merged 2020-09-29"
1669
1756
  [#2381]:https://github.com/puma/puma/pull/2381 "PR by @joergschray, merged 2020-09-24"
1670
1757
  [#2271]:https://github.com/puma/puma/pull/2271 "PR by @wjordan, merged 2020-09-24"
@@ -1691,14 +1778,11 @@ be added back in a future date when a java Puma::MiniSSL is added.
1691
1778
  [#2288]:https://github.com/puma/puma/pull/2288 "PR by @FTLam11, merged 2020-06-02"
1692
1779
  [#1487]:https://github.com/puma/puma/pull/1487 "PR by @jxa, merged 2018-05-09"
1693
1780
  [#2143]:https://github.com/puma/puma/pull/2143 "PR by @jalevin, merged 2020-04-21"
1694
- [#2143]:https://github.com/puma/puma/pull/2143 "PR by @jalevin, merged 2020-04-21"
1695
- [#2143]:https://github.com/puma/puma/pull/2143 "PR by @jalevin, merged 2020-04-21"
1696
- [#2143]:https://github.com/puma/puma/pull/2143 "PR by @jalevin, merged 2020-04-21"
1697
- [#2143]:https://github.com/puma/puma/pull/2143 "PR by @jalevin, merged 2020-04-21"
1698
1781
  [#2169]:https://github.com/puma/puma/pull/2169 "PR by @nateberkopec, merged 2020-03-10"
1699
1782
  [#2170]:https://github.com/puma/puma/pull/2170 "PR by @nateberkopec, merged 2020-03-10"
1700
1783
  [#2076]:https://github.com/puma/puma/pull/2076 "PR by @drews256, merged 2020-02-27"
1701
1784
  [#2022]:https://github.com/puma/puma/pull/2022 "PR by @olleolleolle, merged 2019-11-11"
1785
+ [#2300]:https://github.com/puma/puma/pull/2300 "PR by @alexeevit, merged 2020-07-06"
1702
1786
  [#2269]:https://github.com/puma/puma/pull/2269 "PR by @MSP-Greg, merged 2020-08-31"
1703
1787
  [#2312]:https://github.com/puma/puma/pull/2312 "PR by @MSP-Greg, merged 2020-07-20"
1704
1788
  [#2338]:https://github.com/puma/puma/issues/2338 "Issue by @micahhainlinestitchfix, closed 2020-08-18"
@@ -1715,7 +1799,6 @@ be added back in a future date when a java Puma::MiniSSL is added.
1715
1799
  [#2198]:https://github.com/puma/puma/pull/2198 "PR by @eregon, merged 2020-03-24"
1716
1800
  [#2216]:https://github.com/puma/puma/pull/2216 "PR by @praboud-stripe, merged 2020-04-06"
1717
1801
  [#2122]:https://github.com/puma/puma/pull/2122 "PR by @wjordan, merged 2020-04-10"
1718
- [#2220]:https://github.com/puma/puma/pull/2220 "PR by @wjordan, merged 2020-04-14"
1719
1802
  [#2177]:https://github.com/puma/puma/issues/2177 "Issue by @GuiTeK, closed 2020-04-08"
1720
1803
  [#2221]:https://github.com/puma/puma/pull/2221 "PR by @wjordan, merged 2020-04-17"
1721
1804
  [#2233]:https://github.com/puma/puma/pull/2233 "PR by @ayufan, merged 2020-04-25"
@@ -1724,7 +1807,6 @@ be added back in a future date when a java Puma::MiniSSL is added.
1724
1807
  [#2267]:https://github.com/puma/puma/pull/2267 "PR by @wjordan, merged 2020-05-20"
1725
1808
  [#2287]:https://github.com/puma/puma/pull/2287 "PR by @eugeneius, merged 2020-05-31"
1726
1809
  [#2317]:https://github.com/puma/puma/pull/2317 "PR by @MSP-Greg, merged 2020-09-01"
1727
- [#2312]:https://github.com/puma/puma/pull/2312 "PR by @MSP-Greg, merged 2020-07-20"
1728
1810
  [#2319]:https://github.com/puma/puma/issues/2319 "Issue by @AlexWayfer, closed 2020-09-03"
1729
1811
  [#2326]:https://github.com/puma/puma/pull/2326 "PR by @rkistner, closed 2020-09-04"
1730
1812
  [#2299]:https://github.com/puma/puma/issues/2299 "Issue by @JohnPhillips31416, closed 2020-09-17"
@@ -1733,12 +1815,11 @@ be added back in a future date when a java Puma::MiniSSL is added.
1733
1815
  [#2111]:https://github.com/puma/puma/pull/2111 "PR by @wjordan, merged 2020-02-20"
1734
1816
  [#1980]:https://github.com/puma/puma/pull/1980 "PR by @nateberkopec, merged 2020-02-27"
1735
1817
  [#2189]:https://github.com/puma/puma/pull/2189 "PR by @jkowens, merged 2020-03-19"
1736
- [#2220]:https://github.com/puma/puma/pull/2220 "PR by @wjordan, merged 2020-04-14"
1737
1818
  [#2124]:https://github.com/puma/puma/pull/2124 "PR by @wjordan, merged 2020-04-14"
1738
1819
  [#2223]:https://github.com/puma/puma/pull/2223 "PR by @wjordan, merged 2020-04-20"
1739
1820
  [#2239]:https://github.com/puma/puma/pull/2239 "PR by @wjordan, merged 2020-05-15"
1821
+ [#2496]:https://github.com/puma/puma/pull/2496 "PR by @TheRusskiy, merged 2020-11-30"
1740
1822
  [#2304]:https://github.com/puma/puma/issues/2304 "Issue by @mpeltomaa, closed 2020-09-05"
1741
- [#2269]:https://github.com/puma/puma/pull/2269 "PR by @MSP-Greg, merged 2020-08-31"
1742
1823
  [#2132]:https://github.com/puma/puma/issues/2132 "Issue by @bmclean, closed 2020-02-28"
1743
1824
  [#2010]:https://github.com/puma/puma/pull/2010 "PR by @nateberkopec, merged 2019-10-07"
1744
1825
  [#2012]:https://github.com/puma/puma/pull/2012 "PR by @headius, merged 2019-10-07"
@@ -1766,8 +1847,6 @@ be added back in a future date when a java Puma::MiniSSL is added.
1766
1847
  [#1961]:https://github.com/puma/puma/pull/1961 "PR by @nateberkopec, merged 2019-09-11"
1767
1848
  [#1970]:https://github.com/puma/puma/pull/1970 "PR by @MSP-Greg, merged 2019-09-18"
1768
1849
  [#1946]:https://github.com/puma/puma/pull/1946 "PR by @nateberkopec, merged 2019-09-02"
1769
- [#1941]:https://github.com/puma/puma/pull/1941 "PR by @MSP-Greg, merged 2019-09-02"
1770
- [#1908]:https://github.com/puma/puma/pull/1908 "PR by @MSP-Greg, merged 2019-08-23"
1771
1850
  [#1831]:https://github.com/puma/puma/pull/1831 "PR by @spk, merged 2019-07-27"
1772
1851
  [#1816]:https://github.com/puma/puma/pull/1816 "PR by @ylecuyer, merged 2019-08-01"
1773
1852
  [#1844]:https://github.com/puma/puma/pull/1844 "PR by @ylecuyer, merged 2019-08-01"
@@ -1791,7 +1870,6 @@ be added back in a future date when a java Puma::MiniSSL is added.
1791
1870
  [#1872]:https://github.com/puma/puma/pull/1872 "PR by @MSP-Greg, merged 2019-07-30"
1792
1871
  [#1833]:https://github.com/puma/puma/issues/1833 "Issue by @julik, closed 2019-07-09"
1793
1872
  [#1888]:https://github.com/puma/puma/pull/1888 "PR by @ClikeX, merged 2019-08-06"
1794
- [#1842]:https://github.com/puma/puma/issues/1842 "Issue by @nateberkopec, closed 2019-09-18"
1795
1873
  [#1829]:https://github.com/puma/puma/pull/1829 "PR by @Fudoshiki, merged 2019-07-09"
1796
1874
  [#1832]:https://github.com/puma/puma/pull/1832 "PR by @MSP-Greg, merged 2019-07-08"
1797
1875
  [#1827]:https://github.com/puma/puma/pull/1827 "PR by @amrrbakry, merged 2019-06-27"
@@ -1827,7 +1905,6 @@ be added back in a future date when a java Puma::MiniSSL is added.
1827
1905
  [#1604]:https://github.com/puma/puma/pull/1604 "PR by @schneems, merged 2018-07-02"
1828
1906
  [#1579]:https://github.com/puma/puma/pull/1579 "PR by @schneems, merged 2018-06-14"
1829
1907
  [#1506]:https://github.com/puma/puma/pull/1506 "PR by @dekellum, merged 2018-05-09"
1830
- [#1487]:https://github.com/puma/puma/pull/1487 "PR by @jxa, merged 2018-05-09"
1831
1908
  [#1563]:https://github.com/puma/puma/pull/1563 "PR by @dannyfallon, merged 2018-05-01"
1832
1909
  [#1557]:https://github.com/puma/puma/pull/1557 "PR by @swrobel, merged 2018-05-09"
1833
1910
  [#1529]:https://github.com/puma/puma/pull/1529 "PR by @desnudopenguino, merged 2018-03-20"
@@ -1923,11 +2000,6 @@ be added back in a future date when a java Puma::MiniSSL is added.
1923
2000
  [#1138]:https://github.com/puma/puma/pull/1138 "PR by @steakknife, merged 2016-12-13"
1924
2001
  [#1118]:https://github.com/puma/puma/pull/1118 "PR by @hiroara, merged 2016-11-20"
1925
2002
  [#1075]:https://github.com/puma/puma/issues/1075 "Issue by @pvalena, closed 2016-09-06"
1926
- [#1118]:https://github.com/puma/puma/pull/1118 "PR by @hiroara, merged 2016-11-20"
1927
- [#1036]:https://github.com/puma/puma/issues/1036 "Issue by @matobinder, closed 2016-08-03"
1928
- [#1120]:https://github.com/puma/puma/pull/1120 "PR by @prathamesh-sonpatki, merged 2016-11-21"
1929
- [#1002]:https://github.com/puma/puma/issues/1002 "Issue by @mattyb, closed 2016-07-26"
1930
- [#1089]:https://github.com/puma/puma/issues/1089 "Issue by @AdamBialas, closed 2016-09-17"
1931
2003
  [#932]:https://github.com/puma/puma/issues/932 "Issue by @everplays, closed 2016-07-24"
1932
2004
  [#519]:https://github.com/puma/puma/issues/519 "Issue by @tmornini, closed 2016-07-25"
1933
2005
  [#828]:https://github.com/puma/puma/issues/828 "Issue by @Zapotek, closed 2016-07-24"
@@ -1938,7 +2010,6 @@ be added back in a future date when a java Puma::MiniSSL is added.
1938
2010
  [#925]:https://github.com/puma/puma/issues/925 "Issue by @lokenmakwana, closed 2016-07-24"
1939
2011
  [#911]:https://github.com/puma/puma/issues/911 "Issue by @veganstraightedge, closed 2016-07-24"
1940
2012
  [#620]:https://github.com/puma/puma/issues/620 "Issue by @javanthropus, closed 2016-07-25"
1941
- [#1027]:https://github.com/puma/puma/issues/1027 "Issue by @rosenfeld, closed 2016-07-24"
1942
2013
  [#778]:https://github.com/puma/puma/issues/778 "Issue by @niedhui, closed 2016-07-24"
1943
2014
  [#1021]:https://github.com/puma/puma/pull/1021 "PR by @sarahzrf, merged 2016-07-20"
1944
2015
  [#1022]:https://github.com/puma/puma/issues/1022 "Issue by @AKovtunov, closed 2017-08-16"
@@ -1966,7 +2037,6 @@ be added back in a future date when a java Puma::MiniSSL is added.
1966
2037
  [#788]:https://github.com/puma/puma/issues/788 "Issue by @herregroen, closed 2016-04-07"
1967
2038
  [#894]:https://github.com/puma/puma/issues/894 "Issue by @rafbm, closed 2016-04-07"
1968
2039
  [#937]:https://github.com/puma/puma/issues/937 "Issue by @huangxiangdan, closed 2016-04-07"
1969
- [#840]:https://github.com/puma/puma/issues/840 "Issue by @maxkwallace, closed 2016-04-07"
1970
2040
  [#945]:https://github.com/puma/puma/pull/945 "PR by @dekellum, merged 2016-04-07"
1971
2041
  [#946]:https://github.com/puma/puma/pull/946 "PR by @vipulnsward, merged 2016-04-07"
1972
2042
  [#947]:https://github.com/puma/puma/pull/947 "PR by @vipulnsward, merged 2016-04-07"
@@ -2096,7 +2166,7 @@ be added back in a future date when a java Puma::MiniSSL is added.
2096
2166
  [#646]:https://github.com/puma/puma/pull/646 "PR by @mkonecny, merged 2015-02-05"
2097
2167
  [#630]:https://github.com/puma/puma/issues/630 "Issue by @jelmd, closed 2015-01-20"
2098
2168
  [#622]:https://github.com/puma/puma/issues/622 "Issue by @sabamotto, closed 2015-01-20"
2099
- [#583]:https://github.com/puma/puma/issues/583 "Issue by @emq, closed 2015-01-20"
2169
+ [#583]:https://github.com/puma/puma/issues/583 "Issue by @rwojsznis, closed 2015-01-20"
2100
2170
  [#586]:https://github.com/puma/puma/issues/586 "Issue by @ponchik, closed 2015-01-20"
2101
2171
  [#359]:https://github.com/puma/puma/issues/359 "Issue by @natew, closed 2014-12-13"
2102
2172
  [#633]:https://github.com/puma/puma/issues/633 "Issue by @joevandyk, closed 2015-01-20"
data/README.md CHANGED
@@ -64,20 +64,30 @@ You can run your Sinatra application with Puma from the command line like this:
64
64
  $ ruby app.rb -s Puma
65
65
  ```
66
66
 
67
- Or you can configure your Sinatra application to always use Puma:
67
+ In order to actually configure Puma using a config file, like `puma.rb`, however, you need to use the `puma` executable. To do this, you must add a rackup file to your Sinatra app:
68
68
 
69
69
  ```ruby
70
- require 'sinatra'
71
- configure { set :server, :puma }
70
+ # config.ru
71
+ require './app'
72
+ run Sinatra::Application
73
+ ```
74
+
75
+ You can then start your application using:
76
+
77
+ ```
78
+ $ bundle exec puma
72
79
  ```
73
80
 
74
81
  ## Configuration
75
82
 
76
- Puma provides numerous options. Consult `puma -h` (or `puma --help`) for a full list of CLI options, or see [dsl.rb](https://github.com/puma/puma/blob/master/lib/puma/dsl.rb).
83
+ Puma provides numerous options. Consult `puma -h` (or `puma --help`) for a full list of CLI options, or see `Puma::DSL` or [dsl.rb](https://github.com/puma/puma/blob/master/lib/puma/dsl.rb).
77
84
 
78
85
  You can also find several configuration examples as part of the
79
86
  [test](https://github.com/puma/puma/tree/master/test/config) suite.
80
87
 
88
+ For debugging purposes, you can set the environment variable `PUMA_LOG_CONFIG` with a value
89
+ and the loaded configuration will be printed as part of the boot process.
90
+
81
91
  ### Thread Pool
82
92
 
83
93
  Puma uses a thread pool. You can set the minimum and maximum number of threads that are available in the pool with the `-t` (or `--threads`) flag:
@@ -136,12 +146,12 @@ before_fork do
136
146
  end
137
147
  ```
138
148
 
139
- Preloading can’t be used with phased restart, since phased restart kills and restarts workers one-by-one, and preload_app copies the code of master into the workers.
149
+ Preloading can’t be used with phased restart, since phased restart kills and restarts workers one-by-one, and `preload_app!` copies the code of master into the workers.
140
150
 
141
151
  ### Error handling
142
152
 
143
153
  If puma encounters an error outside of the context of your application, it will respond with a 500 and a simple
144
- textual error message (see `lowlevel_error` in [this file](https://github.com/puma/puma/blob/master/lib/puma/server.rb)).
154
+ textual error message (see `Puma::Server#lowlevel_error` or [server.rb](https://github.com/puma/puma/blob/master/lib/puma/server.rb)).
145
155
  You can specify custom behavior for this scenario. For example, you can report the error to your third-party
146
156
  error-tracking service (in this example, [rollbar](https://rollbar.com)):
147
157
 
@@ -194,7 +204,7 @@ $ puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert&ssl_cipher_fil
194
204
  $ puma -b 'ssl://127.0.0.1:9292?keystore=path_to_keystore&keystore-pass=keystore_password&ssl_cipher_list=TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA'
195
205
  ```
196
206
 
197
- See https://www.openssl.org/docs/man1.0.2/apps/ciphers.html for cipher filter format and full list of cipher suites.
207
+ See https://www.openssl.org/docs/man1.1.1/man1/ciphers.html for cipher filter format and full list of cipher suites.
198
208
 
199
209
  Disable TLS v1 with the `no_tlsv1` option:
200
210
 
@@ -202,6 +212,23 @@ Disable TLS v1 with the `no_tlsv1` option:
202
212
  $ puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert&no_tlsv1=true'
203
213
  ```
204
214
 
215
+ #### Controlling OpenSSL Verification Flags
216
+
217
+ To enable verification flags offered by OpenSSL, use `verification_flags` (not available for JRuby):
218
+
219
+ ```
220
+ $ puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert&verification_flags=PARTIAL_CHAIN'
221
+ ```
222
+
223
+ You can also set multiple verification flags (by separating them with coma):
224
+
225
+ ```
226
+ $ puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert&verification_flags=PARTIAL_CHAIN,CRL_CHECK'
227
+ ```
228
+
229
+ List of available flags: `USE_CHECK_TIME`, `CRL_CHECK`, `CRL_CHECK_ALL`, `IGNORE_CRITICAL`, `X509_STRICT`, `ALLOW_PROXY_CERTS`, `POLICY_CHECK`, `EXPLICIT_POLICY`, `INHIBIT_ANY`, `INHIBIT_MAP`, `NOTIFY_POLICY`, `EXTENDED_CRL_SUPPORT`, `USE_DELTAS`, `CHECK_SS_SIGNATURE`, `TRUSTED_FIRST`, `SUITEB_128_LOS_ONLY`, `SUITEB_192_LOS`, `SUITEB_128_LOS`, `PARTIAL_CHAIN`, `NO_ALT_CHAINS`, `NO_CHECK_TIME`
230
+ (see https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_hostflags.html#VERIFICATION-FLAGS).
231
+
205
232
  ### Control/Status Server
206
233
 
207
234
  Puma has a built-in status and control app that can be used to query and control Puma.
@@ -210,7 +237,7 @@ Puma has a built-in status and control app that can be used to query and control
210
237
  $ puma --control-url tcp://127.0.0.1:9293 --control-token foo
211
238
  ```
212
239
 
213
- Puma will start the control server on localhost port 9293. All requests to the control server will need to include control token (in this case, `token=foo`) as a query parameter. This allows for simple authentication. Check out [status.rb](https://github.com/puma/puma/blob/master/lib/puma/app/status.rb) to see what the status app has available.
240
+ Puma will start the control server on localhost port 9293. All requests to the control server will need to include control token (in this case, `token=foo`) as a query parameter. This allows for simple authentication. Check out `Puma::App::Status` or [status.rb](https://github.com/puma/puma/blob/master/lib/puma/app/status.rb) to see what the status app has available.
214
241
 
215
242
  You can also interact with the control server via `pumactl`. This command will restart Puma:
216
243
 
@@ -228,7 +255,7 @@ You can also provide a configuration file with the `-C` (or `--config`) flag:
228
255
  $ puma -C /path/to/config
229
256
  ```
230
257
 
231
- If no configuration file is specified, Puma will look for a configuration file at `config/puma.rb`. If an environment is specified, either via the `-e` and `--environment` flags, or through the `RACK_ENV` or the `RAILS_ENV` environment variables, Puma looks for configuration at `config/puma/<environment_name>.rb`.
258
+ If no configuration file is specified, Puma will look for a configuration file at `config/puma.rb`. If an environment is specified, either via the `-e` and `--environment` flags, or through the `RACK_ENV` or the `RAILS_ENV` environment variables, Puma first looks for configuration at `config/puma/<environment_name>.rb`, and then falls back to `config/puma.rb`.
232
259
 
233
260
  If you want to prevent Puma from looking for a configuration file in those locations, provide a dash as the argument to the `-C` (or `--config`) flag:
234
261
 
@@ -236,19 +263,19 @@ If you want to prevent Puma from looking for a configuration file in those locat
236
263
  $ puma -C "-"
237
264
  ```
238
265
 
239
- The other side-effects of setting the environment are whether to show stack traces (in `development` or `test`), and setting RACK_ENV may potentially affect middleware looking for this value to change their behavior. The default puma RACK_ENV value is `development`. You can see all config default values [here](https://github.com/puma/puma/blob/12d1706ddc71b89ed2ee26275e31c788e94ff541/lib/puma/configuration.rb#L170).
266
+ The other side-effects of setting the environment are whether to show stack traces (in `development` or `test`), and setting RACK_ENV may potentially affect middleware looking for this value to change their behavior. The default puma RACK_ENV value is `development`. You can see all config default values in `Puma::Configuration#puma_default_options` or [configuration.rb](https://github.com/puma/puma/blob/61c6213fbab/lib/puma/configuration.rb#L182-L204).
240
267
 
241
- Check out [dsl.rb](https://github.com/puma/puma/blob/master/lib/puma/dsl.rb) to see all available options.
268
+ Check out `Puma::DSL` or [dsl.rb](https://github.com/puma/puma/blob/master/lib/puma/dsl.rb) to see all available options.
242
269
 
243
270
  ## Restart
244
271
 
245
272
  Puma includes the ability to restart itself. When available (MRI, Rubinius, JRuby), Puma performs a "hot restart". This is the same functionality available in *Unicorn* and *NGINX* which keep the server sockets open between restarts. This makes sure that no pending requests are dropped while the restart is taking place.
246
273
 
247
- For more, see the [restart documentation](https://github.com/puma/puma/blob/master/docs/restart.md).
274
+ For more, see the [Restart documentation](docs/restart.md).
248
275
 
249
276
  ## Signals
250
277
 
251
- Puma responds to several signals. A detailed guide to using UNIX signals with Puma can be found in the [signals documentation](https://github.com/puma/puma/blob/master/docs/signals.md).
278
+ Puma responds to several signals. A detailed guide to using UNIX signals with Puma can be found in the [Signals documentation](docs/signals.md).
252
279
 
253
280
  ## Platform Constraints
254
281
 
@@ -256,6 +283,7 @@ Some platforms do not support all Puma features.
256
283
 
257
284
  * **JRuby**, **Windows**: server sockets are not seamless on restart, they must be closed and reopened. These platforms have no way to pass descriptors into a new process that is exposed to Ruby. Also, cluster mode is not supported due to a lack of fork(2).
258
285
  * **Windows**: Cluster mode is not supported due to a lack of fork(2).
286
+ * **Kubernetes**: The way Kubernetes handles pod shutdowns interacts poorly with server processes implementing graceful shutdown, like Puma. See the [kubernetes section of the documentation](docs/kubernetes.md) for more details.
259
287
 
260
288
  ## Known Bugs
261
289
 
@@ -278,8 +306,12 @@ It is common to use process monitors with Puma. Modern process monitors like sys
278
306
  provide continuous monitoring and restarts for increased
279
307
  reliability in production environments:
280
308
 
281
- * [docs/jungle](https://github.com/puma/puma/tree/master/docs/jungle) for rc.d
282
- * [docs/systemd](https://github.com/puma/puma/blob/master/docs/systemd.md)
309
+ * [rc.d](docs/jungle/rc.d/README.md)
310
+ * [systemd](docs/systemd.md)
311
+
312
+ Community guides:
313
+
314
+ * [Deploying Puma on OpenBSD using relayd and httpd](https://gist.github.com/anon987654321/4532cf8d6c59c1f43ec8973faa031103)
283
315
 
284
316
  ## Community Extensions
285
317
 
@@ -295,9 +327,7 @@ reliability in production environments:
295
327
 
296
328
  ## Contributing
297
329
 
298
- Find details for contributing in the [contribution guide].
299
-
300
- [contribution guide]: https://github.com/puma/puma/blob/master/CONTRIBUTING.md
330
+ Find details for contributing in the [contribution guide](CONTRIBUTING.md).
301
331
 
302
332
  ## License
303
333
 
@@ -0,0 +1,19 @@
1
+ # Compile Options
2
+
3
+ There are some `cflags` provided to change Puma's default configuration for its C extension.
4
+
5
+ ## Query String, `PUMA_QUERY_STRING_MAX_LENGTH`
6
+
7
+ By default, the max length of `QUERY_STRING` is `1024 * 10`. But you may want to adjust it to allow accept larger queries in GET requests.
8
+
9
+ For manual install, pass the `PUMA_QUERY_STRING_MAX_LENGTH` option like this:
10
+
11
+ ```
12
+ gem install puma -- --with-cflags="-D PUMA_QUERY_STRING_MAX_LENGTH=64000"
13
+ ```
14
+
15
+ For Bundler, use its configuration system:
16
+
17
+ ```
18
+ bundle config build.puma "--with-cflags='-D PUMA_QUERY_STRING_MAX_LENGTH=64000'"
19
+ ```