passenger 6.0.12 → 6.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +37 -1
  3. data/bin/passenger-install-nginx-module +1 -1
  4. data/dev/copy_boost_headers +30 -15
  5. data/resources/mime.types +1 -0
  6. data/resources/templates/standalone/server.erb +1 -0
  7. data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +1 -0
  8. data/src/agent/Core/ApplicationPool/Options.h +5 -0
  9. data/src/agent/Core/Config.h +1 -1
  10. data/src/agent/Core/Controller/Config.h +5 -2
  11. data/src/agent/Core/Controller/InitRequest.cpp +2 -0
  12. data/src/agent/Core/OptionParser.h +4 -0
  13. data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +7 -0
  14. data/src/agent/Core/SpawningKit/Config.h +13 -0
  15. data/src/agent/Core/SpawningKit/Handshake/Prepare.h +4 -0
  16. data/src/agent/Core/SpawningKit/Spawner.h +1 -0
  17. data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +4 -0
  18. data/src/agent/Watchdog/Config.h +1 -1
  19. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +5 -0
  20. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +5 -0
  21. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +18 -0
  22. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +3 -0
  23. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +3 -0
  24. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +11 -0
  25. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -0
  26. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +17 -0
  27. data/src/apache2_module/Hooks.cpp +1 -0
  28. data/src/cxx_supportlib/Constants.h +1 -1
  29. data/src/cxx_supportlib/vendor-modified/boost/align/align.hpp +19 -0
  30. data/src/cxx_supportlib/vendor-modified/boost/align/alignment_of.hpp +54 -0
  31. data/src/cxx_supportlib/vendor-modified/boost/align/alignment_of_forward.hpp +20 -0
  32. data/src/cxx_supportlib/vendor-modified/boost/align/detail/align_cxx11.hpp +21 -0
  33. data/src/cxx_supportlib/vendor-modified/boost/align/detail/aligned_alloc.hpp +52 -0
  34. data/src/cxx_supportlib/vendor-modified/boost/align/detail/alignment_of.hpp +31 -0
  35. data/src/cxx_supportlib/vendor-modified/boost/align/detail/alignment_of_cxx11.hpp +23 -0
  36. data/src/cxx_supportlib/vendor-modified/boost/align/detail/element_type.hpp +91 -0
  37. data/src/cxx_supportlib/vendor-modified/boost/align/detail/integral_constant.hpp +53 -0
  38. data/src/cxx_supportlib/vendor-modified/boost/align/detail/min_size.hpp +26 -0
  39. data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +8 -0
  40. data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +6 -0
  41. data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +12 -0
  42. data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +5 -0
  43. data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +18 -0
  44. data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +13 -0
  45. data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +3 -0
  46. data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +4 -0
  47. data/src/nginx_module/ngx_http_passenger_module.c +1 -0
  48. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/common.js +50 -29
  49. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/config/cli-config.js +20 -20
  50. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/config/npm-config.js +11 -11
  51. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/config/syslog-config.js +3 -3
  52. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/config.js +8 -2
  53. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/container.js +2 -1
  54. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/logger.js +174 -146
  55. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/console.js +4 -2
  56. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/file.js +15 -5
  57. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/http.js +14 -4
  58. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports.js +26 -24
  59. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston.js +5 -5
  60. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/async/package.json +4 -13
  61. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/colors/package.json +19 -33
  62. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/cycle/package.json +11 -29
  63. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/eyes/package.json +12 -40
  64. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/isstream/package.json +3 -12
  65. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/stack-trace/lib/stack-trace.js +49 -24
  66. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/stack-trace/package.json +4 -16
  67. data/src/nodejs_supportlib/vendor-copy/winston/package.json +11 -55
  68. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +6 -0
  69. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +6 -0
  70. data/src/ruby_supportlib/phusion_passenger/platform_info/linux.rb +2 -1
  71. data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +18 -18
  72. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +7 -1
  73. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +1 -0
  74. data/src/ruby_supportlib/phusion_passenger.rb +5 -5
  75. metadata +12 -7
  76. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/daily-rotate-file.js +0 -601
  77. data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/webhook.js +0 -146
  78. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/pkginfo/LICENSE +0 -19
  79. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/pkginfo/lib/pkginfo.js +0 -136
  80. data/src/nodejs_supportlib/vendor-copy/winston/node_modules/pkginfo/package.json +0 -56
@@ -488,6 +488,12 @@ NGINX_CONFIGURATION_OPTIONS = [
488
488
  :type => :flag,
489
489
  :default => true
490
490
  },
491
+ {
492
+ :name => 'passenger_preload_bundler',
493
+ :scope => :application,
494
+ :type => :flag,
495
+ :default => false
496
+ },
491
497
  {
492
498
  :name => 'passenger_max_request_queue_size',
493
499
  :scope => :application,
@@ -54,7 +54,8 @@ module PhusionPassenger
54
54
  return [:debian]
55
55
  elsif File.exist?("/etc/redhat-release")
56
56
  redhat_release = read_file("/etc/redhat-release")
57
- if redhat_release =~ /CentOS/
57
+ if redhat_release =~ /CentOS|AlmaLinux|Rocky Linux/
58
+ # For now treat all non-RHEL enterprise linux distros the same
58
59
  return [:centos, :redhat]
59
60
  elsif redhat_release =~ /Fedora/
60
61
  return [:fedora, :redhat]
@@ -68,10 +68,10 @@ module PhusionPassenger
68
68
  @protocol = Utils.require_option(options, :protocol)
69
69
  @app_group_name = Utils.require_option(options, :app_group_name)
70
70
  Utils.install_options_as_ivars(self, options,
71
- :app,
72
- :connect_password,
73
- :keepalive_enabled
74
- )
71
+ :app,
72
+ :connect_password,
73
+ :keepalive_enabled
74
+ )
75
75
 
76
76
  @stats_mutex = Mutex.new
77
77
  @interruptable = false
@@ -118,7 +118,7 @@ module PhusionPassenger
118
118
  @stats_mutex.synchronize { @interruptable = true }
119
119
  end
120
120
 
121
- private
121
+ private
122
122
  # Returns true if the socket has been hijacked, false otherwise.
123
123
  def accept_and_process_next_request(socket_wrapper, channel, buffer)
124
124
  @stats_mutex.synchronize do
@@ -176,8 +176,8 @@ module PhusionPassenger
176
176
  raise
177
177
  rescue => e
178
178
  if socket_wrapper && socket_wrapper.source_of_exception?(e)
179
- # EPIPE is harmless, it just means that the client closed the connection.
180
- if !e.is_a?(Errno::EPIPE)
179
+ # EPIPE and ECONNRESET are harmless, it just means that the client closed the connection.
180
+ if !should_swallow_app_error?(e, socket_wrapper)
181
181
  print_exception("Passenger RequestHandler's client socket", e)
182
182
  end
183
183
  else
@@ -218,14 +218,14 @@ module PhusionPassenger
218
218
  headers = Utils::NativeSupportUtils.split_by_null_into_hash(headers_data)
219
219
  if @connect_password && headers[PASSENGER_CONNECT_PASSWORD] != @connect_password
220
220
  warn "*** Passenger RequestHandler warning: " <<
221
- "someone tried to connect with an invalid connect password."
221
+ "someone tried to connect with an invalid connect password."
222
222
  return
223
223
  else
224
224
  return headers
225
225
  end
226
226
  rescue SecurityError => e
227
227
  warn("*** Passenger RequestHandler warning: " <<
228
- "HTTP header size exceeded maximum.")
228
+ "HTTP header size exceeded maximum.")
229
229
  return
230
230
  end
231
231
 
@@ -241,7 +241,7 @@ module PhusionPassenger
241
241
  end
242
242
  if data.size >= MAX_HEADER_SIZE
243
243
  warn("*** Passenger RequestHandler warning: " <<
244
- "HTTP header size exceeded maximum.")
244
+ "HTTP header size exceeded maximum.")
245
245
  return
246
246
  end
247
247
 
@@ -255,7 +255,7 @@ module PhusionPassenger
255
255
  protocol = $3
256
256
  if request_method.nil?
257
257
  warn("*** Passenger RequestHandler warning: " <<
258
- "Invalid HTTP request.")
258
+ "Invalid HTTP request.")
259
259
  return
260
260
  end
261
261
  path_info, query_string = request_uri.split("?", 2)
@@ -286,7 +286,7 @@ module PhusionPassenger
286
286
 
287
287
  if @connect_password && headers["HTTP_X_PASSENGER_CONNECT_PASSWORD"] != @connect_password
288
288
  warn "*** Passenger RequestHandler warning: " <<
289
- "someone tried to connect with an invalid connect password."
289
+ "someone tried to connect with an invalid connect password."
290
290
  return
291
291
  else
292
292
  return headers
@@ -304,16 +304,16 @@ module PhusionPassenger
304
304
  connection.write("oobw done")
305
305
  end
306
306
 
307
- # def process_request(env, connection, socket_wrapper, full_http_response)
308
- # raise NotImplementedError, "Override with your own implementation!"
309
- # end
307
+ # def process_request(env, connection, socket_wrapper, full_http_response)
308
+ # raise NotImplementedError, "Override with your own implementation!"
309
+ # end
310
310
 
311
311
  def prepare_request(connection, headers)
312
312
  transfer_encoding = headers[HTTP_TRANSFER_ENCODING]
313
313
  content_length = headers[CONTENT_LENGTH]
314
314
  @can_keepalive = @keepalive_enabled &&
315
- !transfer_encoding &&
316
- !content_length
315
+ !transfer_encoding &&
316
+ !content_length
317
317
  @keepalive_performed = false
318
318
 
319
319
  if !transfer_encoding && !content_length
@@ -342,7 +342,7 @@ module PhusionPassenger
342
342
  end
343
343
 
344
344
  def should_swallow_app_error?(e, socket_wrapper)
345
- return socket_wrapper && socket_wrapper.source_of_exception?(e) && e.is_a?(Errno::EPIPE)
345
+ return socket_wrapper && socket_wrapper.source_of_exception?(e) && [Errno::EPIPE, Errno::ECONNRESET].any?{|er| e.is_a?(er)}
346
346
  end
347
347
  end
348
348
 
@@ -293,13 +293,19 @@ module PhusionPassenger
293
293
  :name => :load_shell_envvars,
294
294
  :type => :boolean,
295
295
  # The Standalone mode is primarily used for serving a single app (except
296
- # when in mass deployment mode), so load_shell_envvars id disabled by
296
+ # when in mass deployment mode), so load_shell_envvars is disabled by
297
297
  # default. However, it's enabled by default in the Core, so we need to
298
298
  # explicitly set it to disabled here.
299
299
  :default => false,
300
300
  :desc => "Load shell startup files before loading\n" \
301
301
  'application'
302
302
  },
303
+ {
304
+ :name => :preload_bundler,
305
+ :type => :boolean,
306
+ :default => false,
307
+ :desc => "Tell Ruby to load the bundler gem before loading the application"
308
+ },
303
309
  {
304
310
  :name => :app_file_descriptor_ulimit,
305
311
  :type => :integer,
@@ -159,6 +159,7 @@ module PhusionPassenger
159
159
  end
160
160
  add_param(command, :force_max_concurrent_requests_per_process, "--force-max-concurrent-requests-per-process")
161
161
  add_flag_param(command, :load_shell_envvars, "--load-shell-envvars")
162
+ add_flag_param(command, :preload_bundler, "--preload-bundler")
162
163
  add_param(command, :max_pool_size, "--max-pool-size")
163
164
  add_param(command, :min_instances, "--min-instances")
164
165
  add_param(command, :pool_idle_time, "--pool-idle-time")
@@ -31,16 +31,16 @@ module PhusionPassenger
31
31
 
32
32
  PACKAGE_NAME = 'passenger'
33
33
  # Run 'rake src/cxx_supportlib/Constants.h configkit_schemas_inline_comments' after changing this number.
34
- VERSION_STRING = '6.0.12'
34
+ VERSION_STRING = '6.0.13'
35
35
 
36
36
  # Tip: find the SHA-256 with ./dev/nginx_version_sha2 <VERSION>
37
- PREFERRED_NGINX_VERSION = '1.20.1'
38
- NGINX_SHA256_CHECKSUM = 'e462e11533d5c30baa05df7652160ff5979591d291736cfa5edb9fd2edb48c49'
37
+ PREFERRED_NGINX_VERSION = '1.20.2'
38
+ NGINX_SHA256_CHECKSUM = '958876757782190a1653e14dc26dfc7ba263de310e04c113e11e97d1bef45a42'
39
39
 
40
40
  # Packaging may be locked to an older version due to the specific module configuration being
41
41
  # incompatible with the version we prefer (latest stable).
42
- PACKAGING_PREFERRED_NGINX_VERSION = '1.20.1'
43
- PACKAGING_NGINX_SHA256_CHECKSUM = 'e462e11533d5c30baa05df7652160ff5979591d291736cfa5edb9fd2edb48c49'
42
+ PACKAGING_PREFERRED_NGINX_VERSION = '1.20.2'
43
+ PACKAGING_NGINX_SHA256_CHECKSUM = '958876757782190a1653e14dc26dfc7ba263de310e04c113e11e97d1bef45a42'
44
44
 
45
45
  # sha256sum of the .tar.gz
46
46
  PREFERRED_PCRE_VERSION = '8.45'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.12
4
+ version: 6.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phusion - http://www.phusion.nl/
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-03 00:00:00.000000000 Z
11
+ date: 2022-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -666,9 +666,19 @@ files:
666
666
  - src/cxx_supportlib/vendor-modified/boost/algorithm/string/trim.hpp
667
667
  - src/cxx_supportlib/vendor-modified/boost/algorithm/string/trim_all.hpp
668
668
  - src/cxx_supportlib/vendor-modified/boost/algorithm/string/yes_no_type.hpp
669
+ - src/cxx_supportlib/vendor-modified/boost/align/align.hpp
669
670
  - src/cxx_supportlib/vendor-modified/boost/align/aligned_alloc.hpp
671
+ - src/cxx_supportlib/vendor-modified/boost/align/alignment_of.hpp
672
+ - src/cxx_supportlib/vendor-modified/boost/align/alignment_of_forward.hpp
673
+ - src/cxx_supportlib/vendor-modified/boost/align/detail/align_cxx11.hpp
674
+ - src/cxx_supportlib/vendor-modified/boost/align/detail/aligned_alloc.hpp
670
675
  - src/cxx_supportlib/vendor-modified/boost/align/detail/aligned_alloc_posix.hpp
676
+ - src/cxx_supportlib/vendor-modified/boost/align/detail/alignment_of.hpp
677
+ - src/cxx_supportlib/vendor-modified/boost/align/detail/alignment_of_cxx11.hpp
678
+ - src/cxx_supportlib/vendor-modified/boost/align/detail/element_type.hpp
679
+ - src/cxx_supportlib/vendor-modified/boost/align/detail/integral_constant.hpp
671
680
  - src/cxx_supportlib/vendor-modified/boost/align/detail/is_alignment.hpp
681
+ - src/cxx_supportlib/vendor-modified/boost/align/detail/min_size.hpp
672
682
  - src/cxx_supportlib/vendor-modified/boost/aligned_storage.hpp
673
683
  - src/cxx_supportlib/vendor-modified/boost/array.hpp
674
684
  - src/cxx_supportlib/vendor-modified/boost/asio.hpp
@@ -4753,12 +4763,10 @@ files:
4753
4763
  - src/nodejs_supportlib/vendor-copy/winston/lib/winston/logger.js
4754
4764
  - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports.js
4755
4765
  - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/console.js
4756
- - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/daily-rotate-file.js
4757
4766
  - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/file.js
4758
4767
  - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/http.js
4759
4768
  - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/memory.js
4760
4769
  - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/transport.js
4761
- - src/nodejs_supportlib/vendor-copy/winston/lib/winston/transports/webhook.js
4762
4770
  - src/nodejs_supportlib/vendor-copy/winston/node_modules/async/LICENSE
4763
4771
  - src/nodejs_supportlib/vendor-copy/winston/node_modules/async/lib/async.js
4764
4772
  - src/nodejs_supportlib/vendor-copy/winston/node_modules/async/package.json
@@ -4786,9 +4794,6 @@ files:
4786
4794
  - src/nodejs_supportlib/vendor-copy/winston/node_modules/isstream/LICENSE.md
4787
4795
  - src/nodejs_supportlib/vendor-copy/winston/node_modules/isstream/isstream.js
4788
4796
  - src/nodejs_supportlib/vendor-copy/winston/node_modules/isstream/package.json
4789
- - src/nodejs_supportlib/vendor-copy/winston/node_modules/pkginfo/LICENSE
4790
- - src/nodejs_supportlib/vendor-copy/winston/node_modules/pkginfo/lib/pkginfo.js
4791
- - src/nodejs_supportlib/vendor-copy/winston/node_modules/pkginfo/package.json
4792
4797
  - src/nodejs_supportlib/vendor-copy/winston/node_modules/stack-trace/License
4793
4798
  - src/nodejs_supportlib/vendor-copy/winston/node_modules/stack-trace/lib/stack-trace.js
4794
4799
  - src/nodejs_supportlib/vendor-copy/winston/node_modules/stack-trace/package.json