1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
puma--puma/lib/puma
Jesús Burgos Maciá 2deaf77a38 Swallow connection errors when sending early hints (#1822)
* Swallow connection errors when sending early hints

I've been thinking on how Puma should behave when the early hints
can't be sent because the connection has been lost.

I first thought that it should behave the same way it does when the
connection is lost before main response is sent, I've seen that it
swallows those errors (https://git.io/fjVtg) so perhaps we should do
the same here.

There's one consideration though. Because the early hints are sent at
the very beginning of the app execution, we may want to abort this
request altogether and save resources by throwing an exception and
causing Rails to interrupt execution.

Finally I decided to overlook that case just because I believe it's
least surprising from the Rack app point of view. Also
I haven't seen any other example of the web server interrupting
the apps execution due to an error on the lower layer.

Fixes #1640.

* Adds a test

* Updates test as per @nateberkopec's suggestion
2019-08-01 12:23:08 -07:00
..
app Test cleanup and parallelization (#1846) 2019-07-16 18:53:28 -04:00
plugin Test cleanup and parallelization (#1846) 2019-07-16 18:53:28 -04:00
rack Test cleanup and parallelization (#1846) 2019-07-16 18:53:28 -04:00
accept_nonblock.rb Test cleanup and parallelization (#1846) 2019-07-16 18:53:28 -04:00
binder.rb fix #1775 (#1829) 2019-07-09 10:26:43 -05:00
cli.rb Freeze all the strings! 2018-09-17 11:41:14 -05:00
client.rb Updates docs, removes refs. to IO.select() 2019-06-11 17:20:41 -04:00
cluster.rb Make Launcher#close_binder_listeners public 2019-06-07 14:10:20 -05:00
commonlogger.rb Freeze all the strings! 2018-09-17 11:41:14 -05:00
configuration.rb Fix Typos (#1859) 2019-07-22 10:33:19 -04:00
const.rb RACK_URL_SCHEME calculation caring about more headers (#1491) 2019-07-17 18:48:45 -04:00
control_cli.rb Add status to pumactl with pidfile (#1824) 2019-06-23 19:36:06 -05:00
convenient.rb Freeze all the strings! 2018-09-17 11:41:14 -05:00
daemon_ext.rb Freeze all the strings! 2018-09-17 11:41:14 -05:00
delegation.rb Freeze all the strings! 2018-09-17 11:41:14 -05:00
detect.rb Freeze all the strings! 2018-09-17 11:41:14 -05:00
dsl.rb Allow to define a custom formatter for logs (#1816) 2019-08-01 12:21:23 -07:00
events.rb Add REQUEST_PATH on parse error message (#1831) 2019-07-27 09:15:55 -07:00
io_buffer.rb re-implement (native) IOBuffer for JRuby 2018-12-20 12:40:15 +01:00
jruby_restart.rb Freeze all the strings! 2018-09-17 11:41:14 -05:00
launcher.rb Allow to define a custom formatter for logs (#1816) 2019-08-01 12:21:23 -07:00
minissl.rb Merge pull request #1665 from amatsuda/mismatched_indentation 2019-02-19 21:09:19 -08:00
null_io.rb Freeze all the strings! 2018-09-17 11:41:14 -05:00
plugin.rb Freeze all the strings! 2018-09-17 11:41:14 -05:00
rack_default.rb Test cleanup and parallelization (#1846) 2019-07-16 18:53:28 -04:00
reactor.rb Fix Typos (#1859) 2019-07-22 10:33:19 -04:00
runner.rb Fixes the bug that wouldn't allow no_token be set to true (#1803) 2019-05-28 09:37:34 -04:00
server.rb Swallow connection errors when sending early hints (#1822) 2019-08-01 12:23:08 -07:00
single.rb Merge pull request #1655 from mipearson/mp-puma-hack 2019-02-19 21:09:00 -08:00
state_file.rb Freeze all the strings! 2018-09-17 11:41:14 -05:00
tcp_logger.rb Freeze all the strings! 2018-09-17 11:41:14 -05:00
thread_pool.rb Merge pull request #1648 from wjordan/oob 2019-02-19 17:14:21 -08:00
util.rb Remove URI backport for Ruby 1.9.3 (#1709) 2019-02-14 14:37:27 -07:00