1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
Commit graph

13 commits

Author SHA1 Message Date
Jesús Burgos Maciá
d39fe92a2d Fixes the bug that wouldn't allow no_token be set to true (#1803)
* Fix crash when no_token is set

* Use a more meaningful name instead of an empty string

* Adds a test to ensure `{ no_token: true }` works

* Adds an explanation for the usage of a String

Just to justify the use of a String instead of a Symbol.

* Removes thread that would start the server

This removes the part of the test that would start the server. The
reason why the thread was being created originally in the PR was to
ensure that the server was booting even with `{ no_token: true }`.

I believe we don't need to test the full server boot but just ensure
that we won't pass a Symbol to OptionParser. In particular the test
ensures that the token will be set to `'none'` when `no_token: true`.

There're already other tests testing that the server boots.
2019-05-28 09:37:34 -04:00
Evan Phoenix
6568aaeaf5
Merge pull request #1689 from michaelherold/allow-ca-to-be-set-in-bind-dsl
Allow mutual TLS CA to be set using `ssl_bind` DSL
2019-03-11 16:39:52 -07:00
Michał Kulesza
ac0652f5a1 add tests 2019-02-21 21:31:35 +01:00
Michael Herold
5a92683afd
Allow mutual TLS CA to be set using ssl_bind DSL
When using mutual TLS, you must specify the CA certificate chain to use
for verifying the peer. Using Puma's `ssl_bind` DSL did not give you the
option of doing so, which lead to confusing errors when attempting to
use it.

Now, when specifying the `verify_mode` as either `peer` or `force_peer`,
you can use the DSL to set the `ca` value as needed within the `Binder`.
This allows you to use the DSL instead of falling back to the default
`bind` syntax via the URI-style configuration pattern.
2019-02-20 14:27:00 -06:00
mitto
cf15db20b9 worker_timeout, worker_boot_timeout, worker_shutdown_timeout fix integer convert (#1450)
* worker_timeout, worker_boot_timeout, worker_shutdown_timeout fix integer convert

* persistent_timeout, first_data_timeout fix integer convert

* add integer convert test case

* fix method name typo

* switch gem update --system
2018-03-19 15:05:15 -06:00
Vladimir Dementyev
2cb2357d39 Let's use Rubocop! (#1325)
* Add limited rubocop config and TODO config

* Remove trailing whitespaces and blanklines

* Add rubocop rake task; upd travis.yml
2017-06-04 13:21:05 -07:00
Michael Grosser
61de1a8891 sort configs/rackups/tests (#1268) 2017-04-11 14:08:18 -07:00
Thomas Walpole
5f24229fbc Specified parameters should overwrite loaded config files 2017-01-30 20:29:19 -08:00
Evan Phoenix
663666c5b7 Add plugin mechanism and initial plugin 2016-02-06 22:28:02 -08:00
Sven Riedel
c365f2d1fc Don't persist before_fork hook in state file 2015-12-10 09:01:47 +01:00
schneems
3f2fb13fcd Ignore multiple port declarations
Right now if you specify a port via `-p $PORT` and via a `config/puma.rb` then puma will incorrectly try to bind to the same port twice and will fail.

This PR calls `uniq!` on the array to remove duplicate ports from the `binds` array.
2015-02-17 08:58:19 -06:00
Arthur Neves
e424eaf052
Add config to customize the default error message
Add a lowlevel_error_handler, so we can customize the default error
message.

example:

```
lowlevel_error_handler do
  [302, {'Content-Type' => 'text', 'Location' => 'foo.html'}, ['302 found']]
end
```

[fix #458]
2014-02-17 12:29:58 -05:00
Evan Phoenix
e88fc14952 Refactor more of the configuration 2011-12-07 13:43:10 -08:00