passenger 6.0.12 → 6.0.13

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.
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
@@ -0,0 +1,54 @@
1
+ /*
2
+ Copyright 2014-2016 Glen Joseph Fernandes
3
+ (glenjofe@gmail.com)
4
+
5
+ Distributed under the Boost Software License, Version 1.0.
6
+ (http://www.boost.org/LICENSE_1_0.txt)
7
+ */
8
+ #ifndef BOOST_ALIGN_ALIGNMENT_OF_HPP
9
+ #define BOOST_ALIGN_ALIGNMENT_OF_HPP
10
+
11
+ #include <boost/align/detail/element_type.hpp>
12
+ #include <boost/align/alignment_of_forward.hpp>
13
+
14
+ #if defined(_MSC_VER) && defined(__clang__)
15
+ #include <boost/align/detail/alignment_of_cxx11.hpp>
16
+ #elif defined(BOOST_MSVC)
17
+ #include <boost/align/detail/alignment_of_msvc.hpp>
18
+ #elif defined(__GNUC__) && defined(__unix__) && !defined(__LP64__)
19
+ #include <boost/align/detail/alignment_of.hpp>
20
+ #elif defined(BOOST_CLANG) && !defined(__x86_64__)
21
+ #include <boost/align/detail/alignment_of.hpp>
22
+ #elif !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
23
+ #include <boost/align/detail/alignment_of_cxx11.hpp>
24
+ #elif defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600)
25
+ #include <boost/align/detail/alignment_of_gcc.hpp>
26
+ #elif defined(BOOST_CODEGEARC)
27
+ #include <boost/align/detail/alignment_of_codegear.hpp>
28
+ #elif defined(BOOST_CLANG)
29
+ #include <boost/align/detail/alignment_of_clang.hpp>
30
+ #elif __GNUC__ > 4
31
+ #include <boost/align/detail/alignment_of_gcc.hpp>
32
+ #elif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)
33
+ #include <boost/align/detail/alignment_of_gcc.hpp>
34
+ #else
35
+ #include <boost/align/detail/alignment_of.hpp>
36
+ #endif
37
+
38
+ namespace boost {
39
+ namespace alignment {
40
+
41
+ template<class T>
42
+ struct alignment_of
43
+ : detail::alignment_of<typename
44
+ detail::element_type<T>::type>::type { };
45
+
46
+ #if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES)
47
+ template<class T>
48
+ constexpr std::size_t alignment_of_v = alignment_of<T>::value;
49
+ #endif
50
+
51
+ } /* alignment */
52
+ } /* boost */
53
+
54
+ #endif
@@ -0,0 +1,20 @@
1
+ /*
2
+ Copyright 2014 Glen Joseph Fernandes
3
+ (glenjofe@gmail.com)
4
+
5
+ Distributed under the Boost Software License, Version 1.0.
6
+ (http://www.boost.org/LICENSE_1_0.txt)
7
+ */
8
+ #ifndef BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP
9
+ #define BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP
10
+
11
+ namespace boost {
12
+ namespace alignment {
13
+
14
+ template<class T>
15
+ struct alignment_of;
16
+
17
+ } /* alignment */
18
+ } /* boost */
19
+
20
+ #endif
@@ -0,0 +1,21 @@
1
+ /*
2
+ Copyright 2014 Glen Joseph Fernandes
3
+ (glenjofe@gmail.com)
4
+
5
+ Distributed under the Boost Software License, Version 1.0.
6
+ (http://www.boost.org/LICENSE_1_0.txt)
7
+ */
8
+ #ifndef BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP
9
+ #define BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP
10
+
11
+ #include <memory>
12
+
13
+ namespace boost {
14
+ namespace alignment {
15
+
16
+ using std::align;
17
+
18
+ } /* alignment */
19
+ } /* boost */
20
+
21
+ #endif
@@ -0,0 +1,52 @@
1
+ /*
2
+ Copyright 2014-2015 Glen Joseph Fernandes
3
+ (glenjofe@gmail.com)
4
+
5
+ Distributed under the Boost Software License, Version 1.0.
6
+ (http://www.boost.org/LICENSE_1_0.txt)
7
+ */
8
+ #ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP
9
+ #define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP
10
+
11
+ #include <boost/align/detail/is_alignment.hpp>
12
+ #include <boost/align/align.hpp>
13
+ #include <boost/align/alignment_of.hpp>
14
+ #include <boost/assert.hpp>
15
+ #include <cstdlib>
16
+
17
+ namespace boost {
18
+ namespace alignment {
19
+
20
+ inline void*
21
+ aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
22
+ {
23
+ BOOST_ASSERT(detail::is_alignment(alignment));
24
+ enum {
25
+ N = alignment_of<void*>::value
26
+ };
27
+ if (alignment < N) {
28
+ alignment = N;
29
+ }
30
+ std::size_t n = size + alignment - N;
31
+ void* p = std::malloc(sizeof(void*) + n);
32
+ if (p) {
33
+ void* r = static_cast<char*>(p) + sizeof(void*);
34
+ (void)boost::alignment::align(alignment, size, r, n);
35
+ *(static_cast<void**>(r) - 1) = p;
36
+ p = r;
37
+ }
38
+ return p;
39
+ }
40
+
41
+ inline void
42
+ aligned_free(void* ptr) BOOST_NOEXCEPT
43
+ {
44
+ if (ptr) {
45
+ std::free(*(static_cast<void**>(ptr) - 1));
46
+ }
47
+ }
48
+
49
+ } /* alignment */
50
+ } /* boost */
51
+
52
+ #endif
@@ -0,0 +1,31 @@
1
+ /*
2
+ Copyright 2014-2015 Glen Joseph Fernandes
3
+ (glenjofe@gmail.com)
4
+
5
+ Distributed under the Boost Software License, Version 1.0.
6
+ (http://www.boost.org/LICENSE_1_0.txt)
7
+ */
8
+ #ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP
9
+ #define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP
10
+
11
+ #include <boost/align/detail/min_size.hpp>
12
+
13
+ namespace boost {
14
+ namespace alignment {
15
+ namespace detail {
16
+
17
+ template<class T>
18
+ struct offset_value {
19
+ char value;
20
+ T object;
21
+ };
22
+
23
+ template<class T>
24
+ struct alignment_of
25
+ : min_size<sizeof(T), sizeof(offset_value<T>) - sizeof(T)> { };
26
+
27
+ } /* detail */
28
+ } /* alignment */
29
+ } /* boost */
30
+
31
+ #endif
@@ -0,0 +1,23 @@
1
+ /*
2
+ Copyright 2014 Glen Joseph Fernandes
3
+ (glenjofe@gmail.com)
4
+
5
+ Distributed under the Boost Software License, Version 1.0.
6
+ (http://www.boost.org/LICENSE_1_0.txt)
7
+ */
8
+ #ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CXX11_HPP
9
+ #define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CXX11_HPP
10
+
11
+ #include <type_traits>
12
+
13
+ namespace boost {
14
+ namespace alignment {
15
+ namespace detail {
16
+
17
+ using std::alignment_of;
18
+
19
+ } /* detail */
20
+ } /* alignment */
21
+ } /* boost */
22
+
23
+ #endif
@@ -0,0 +1,91 @@
1
+ /*
2
+ Copyright 2015 Glen Joseph Fernandes
3
+ (glenjofe@gmail.com)
4
+
5
+ Distributed under the Boost Software License, Version 1.0.
6
+ (http://www.boost.org/LICENSE_1_0.txt)
7
+ */
8
+ #ifndef BOOST_ALIGN_DETAIL_ELEMENT_TYPE_HPP
9
+ #define BOOST_ALIGN_DETAIL_ELEMENT_TYPE_HPP
10
+
11
+ #include <boost/config.hpp>
12
+
13
+ #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
14
+ #include <type_traits>
15
+ #else
16
+ #include <cstddef>
17
+ #endif
18
+
19
+ namespace boost {
20
+ namespace alignment {
21
+ namespace detail {
22
+
23
+ #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
24
+ using std::remove_reference;
25
+ using std::remove_all_extents;
26
+ using std::remove_cv;
27
+ #else
28
+ template<class T>
29
+ struct remove_reference {
30
+ typedef T type;
31
+ };
32
+
33
+ template<class T>
34
+ struct remove_reference<T&> {
35
+ typedef T type;
36
+ };
37
+
38
+ #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
39
+ template<class T>
40
+ struct remove_reference<T&&> {
41
+ typedef T type;
42
+ };
43
+ #endif
44
+
45
+ template<class T>
46
+ struct remove_all_extents {
47
+ typedef T type;
48
+ };
49
+
50
+ template<class T>
51
+ struct remove_all_extents<T[]> {
52
+ typedef typename remove_all_extents<T>::type type;
53
+ };
54
+
55
+ template<class T, std::size_t N>
56
+ struct remove_all_extents<T[N]> {
57
+ typedef typename remove_all_extents<T>::type type;
58
+ };
59
+
60
+ template<class T>
61
+ struct remove_cv {
62
+ typedef T type;
63
+ };
64
+
65
+ template<class T>
66
+ struct remove_cv<const T> {
67
+ typedef T type;
68
+ };
69
+
70
+ template<class T>
71
+ struct remove_cv<volatile T> {
72
+ typedef T type;
73
+ };
74
+
75
+ template<class T>
76
+ struct remove_cv<const volatile T> {
77
+ typedef T type;
78
+ };
79
+ #endif
80
+
81
+ template<class T>
82
+ struct element_type {
83
+ typedef typename remove_cv<typename remove_all_extents<typename
84
+ remove_reference<T>::type>::type>::type type;
85
+ };
86
+
87
+ } /* detail */
88
+ } /* alignment */
89
+ } /* boost */
90
+
91
+ #endif
@@ -0,0 +1,53 @@
1
+ /*
2
+ Copyright 2014-2016 Glen Joseph Fernandes
3
+ (glenjofe@gmail.com)
4
+
5
+ Distributed under the Boost Software License, Version 1.0.
6
+ (http://www.boost.org/LICENSE_1_0.txt)
7
+ */
8
+ #ifndef BOOST_ALIGN_DETAIL_INTEGRAL_CONSTANT_HPP
9
+ #define BOOST_ALIGN_DETAIL_INTEGRAL_CONSTANT_HPP
10
+
11
+ #include <boost/config.hpp>
12
+
13
+ #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
14
+ #include <type_traits>
15
+ #endif
16
+
17
+ namespace boost {
18
+ namespace alignment {
19
+ namespace detail {
20
+
21
+ #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
22
+ using std::integral_constant;
23
+ using std::true_type;
24
+ using std::false_type;
25
+ #else
26
+ template<class T, T Value>
27
+ struct integral_constant {
28
+ typedef T value_type;
29
+ typedef integral_constant type;
30
+
31
+ BOOST_CONSTEXPR operator value_type() const BOOST_NOEXCEPT {
32
+ return Value;
33
+ }
34
+
35
+ BOOST_CONSTEXPR value_type operator()() const BOOST_NOEXCEPT {
36
+ return Value;
37
+ }
38
+
39
+ BOOST_STATIC_CONSTEXPR T value = Value;
40
+ };
41
+
42
+ template<class T, T Value>
43
+ BOOST_CONSTEXPR_OR_CONST T integral_constant<T, Value>::value;
44
+
45
+ typedef integral_constant<bool, true> true_type;
46
+ typedef integral_constant<bool, false> false_type;
47
+ #endif
48
+
49
+ } /* detail */
50
+ } /* alignment */
51
+ } /* boost */
52
+
53
+ #endif
@@ -0,0 +1,26 @@
1
+ /*
2
+ Copyright 2014 Glen Joseph Fernandes
3
+ (glenjofe@gmail.com)
4
+
5
+ Distributed under the Boost Software License, Version 1.0.
6
+ (http://www.boost.org/LICENSE_1_0.txt)
7
+ */
8
+ #ifndef BOOST_ALIGN_DETAIL_MIN_SIZE_HPP
9
+ #define BOOST_ALIGN_DETAIL_MIN_SIZE_HPP
10
+
11
+ #include <boost/align/detail/integral_constant.hpp>
12
+ #include <cstddef>
13
+
14
+ namespace boost {
15
+ namespace alignment {
16
+ namespace detail {
17
+
18
+ template<std::size_t A, std::size_t B>
19
+ struct min_size
20
+ : integral_constant<std::size_t, (A < B) ? A : B> { };
21
+
22
+ } /* detail */
23
+ } /* alignment */
24
+ } /* boost */
25
+
26
+ #endif
@@ -462,6 +462,14 @@
462
462
  offsetof(passenger_loc_conf_t, autogenerated.load_shell_envvars),
463
463
  NULL
464
464
  },
465
+ {
466
+ ngx_string("passenger_preload_bundler"),
467
+ NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
468
+ passenger_conf_set_preload_bundler,
469
+ NGX_HTTP_LOC_CONF_OFFSET,
470
+ offsetof(passenger_loc_conf_t, autogenerated.preload_bundler),
471
+ NULL
472
+ },
465
473
  {
466
474
  ngx_string("passenger_max_request_queue_size"),
467
475
  NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
@@ -293,6 +293,12 @@ set_manifest_autogenerated_app_conf_defaults(manifest_gen_ctx_t *ctx, PsgJsonVal
293
293
  sizeof("passenger_load_shell_envvars") - 1,
294
294
  1);
295
295
 
296
+ add_manifest_options_container_static_default_bool(ctx,
297
+ options_container,
298
+ "passenger_preload_bundler",
299
+ sizeof("passenger_preload_bundler") - 1,
300
+ 0);
301
+
296
302
  add_manifest_options_container_static_default_uint(ctx,
297
303
  options_container,
298
304
  "passenger_max_request_queue_size",
@@ -709,6 +709,18 @@ passenger_conf_set_load_shell_envvars(ngx_conf_t *cf, ngx_command_t *cmd, void *
709
709
  return ngx_conf_set_flag_slot(cf, cmd, conf);
710
710
  }
711
711
 
712
+ static char *
713
+ passenger_conf_set_preload_bundler(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
714
+ passenger_loc_conf_t *passenger_conf = conf;
715
+
716
+ passenger_conf->autogenerated.preload_bundler_explicitly_set = 1;
717
+ record_loc_conf_source_location(cf, passenger_conf,
718
+ &passenger_conf->autogenerated.preload_bundler_source_file,
719
+ &passenger_conf->autogenerated.preload_bundler_source_line);
720
+
721
+ return ngx_conf_set_flag_slot(cf, cmd, conf);
722
+ }
723
+
712
724
  static char *
713
725
  passenger_conf_set_max_request_queue_size(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
714
726
  passenger_loc_conf_t *passenger_conf = conf;
@@ -72,6 +72,7 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
72
72
  conf->direct_instance_request_address.data = NULL;
73
73
  conf->direct_instance_request_address.len = 0;
74
74
  conf->load_shell_envvars = NGX_CONF_UNSET;
75
+ conf->preload_bundler = NGX_CONF_UNSET;
75
76
  conf->max_request_queue_size = NGX_CONF_UNSET_UINT;
76
77
  conf->app_type.data = NULL;
77
78
  conf->app_type.len = 0;
@@ -183,6 +184,10 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
183
184
  conf->load_shell_envvars_source_file.len = 0;
184
185
  conf->load_shell_envvars_source_line = 0;
185
186
  conf->load_shell_envvars_explicitly_set = 0;
187
+ conf->preload_bundler_source_file.data = NULL;
188
+ conf->preload_bundler_source_file.len = 0;
189
+ conf->preload_bundler_source_line = 0;
190
+ conf->preload_bundler_explicitly_set = 0;
186
191
  conf->max_request_queue_size_source_file.data = NULL;
187
192
  conf->max_request_queue_size_source_file.len = 0;
188
193
  conf->max_request_queue_size_source_line = 0;
@@ -172,6 +172,13 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
172
172
  : sizeof("f\r\n") - 1;
173
173
  }
174
174
 
175
+ if (conf->autogenerated.preload_bundler != NGX_CONF_UNSET) {
176
+ len += sizeof("!~PASSENGER_PRELOAD_BUNDLER: ") - 1;
177
+ len += conf->autogenerated.preload_bundler
178
+ ? sizeof("t\r\n") - 1
179
+ : sizeof("f\r\n") - 1;
180
+ }
181
+
175
182
  if (conf->autogenerated.max_request_queue_size != NGX_CONF_UNSET_UINT) {
176
183
  end = ngx_snprintf(int_buf,
177
184
  sizeof(int_buf) - 1,
@@ -453,6 +460,17 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
453
460
  }
454
461
  }
455
462
 
463
+ if (conf->autogenerated.preload_bundler != NGX_CONF_UNSET) {
464
+ pos = ngx_copy(pos,
465
+ "!~PASSENGER_PRELOAD_BUNDLER: ",
466
+ sizeof("!~PASSENGER_PRELOAD_BUNDLER: ") - 1);
467
+ if (conf->autogenerated.preload_bundler) {
468
+ pos = ngx_copy(pos, "t\r\n", sizeof("t\r\n") - 1);
469
+ } else {
470
+ pos = ngx_copy(pos, "f\r\n", sizeof("f\r\n") - 1);
471
+ }
472
+ }
473
+
456
474
  if (conf->autogenerated.max_request_queue_size != NGX_CONF_UNSET_UINT) {
457
475
  pos = ngx_copy(pos,
458
476
  "!~PASSENGER_MAX_REQUEST_QUEUE_SIZE: ",
@@ -318,6 +318,19 @@ generate_config_manifest_for_autogenerated_loc_conf(manifest_gen_ctx_t *ctx, pas
318
318
  psg_json_value_set_bool(hierarchy_member, "value",
319
319
  plcf->autogenerated.load_shell_envvars);
320
320
  }
321
+ if (plcf->autogenerated.preload_bundler_explicitly_set) {
322
+ find_or_create_manifest_app_and_loc_options_containers(ctx,
323
+ plcf, cscf, clcf, &app_options_container, &loc_options_container);
324
+ option_container = find_or_create_manifest_option_container(ctx,
325
+ app_options_container,
326
+ "passenger_preload_bundler",
327
+ sizeof("passenger_preload_bundler") - 1);
328
+ hierarchy_member = add_manifest_option_container_hierarchy_member(option_container,
329
+ &plcf->autogenerated.preload_bundler_source_file,
330
+ plcf->autogenerated.preload_bundler_source_line);
331
+ psg_json_value_set_bool(hierarchy_member, "value",
332
+ plcf->autogenerated.preload_bundler);
333
+ }
321
334
  if (plcf->autogenerated.max_request_queue_size_explicitly_set) {
322
335
  find_or_create_manifest_app_and_loc_options_containers(ctx,
323
336
  plcf, cscf, clcf, &app_options_container, &loc_options_container);
@@ -107,6 +107,9 @@ passenger_merge_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *conf,
107
107
  ngx_conf_merge_value(conf->load_shell_envvars,
108
108
  prev->load_shell_envvars,
109
109
  1);
110
+ ngx_conf_merge_value(conf->preload_bundler,
111
+ prev->preload_bundler,
112
+ 0);
110
113
  ngx_conf_merge_uint_value(conf->max_request_queue_size,
111
114
  prev->max_request_queue_size,
112
115
  100);
@@ -56,6 +56,7 @@ typedef struct {
56
56
  ngx_uint_t max_requests;
57
57
  ngx_uint_t min_instances;
58
58
  ngx_array_t *monitor_log_file;
59
+ ngx_flag_t preload_bundler;
59
60
  ngx_int_t request_queue_overflow_status_code;
60
61
  ngx_int_t spawn_exception_status_code;
61
62
  ngx_uint_t start_timeout;
@@ -111,6 +112,7 @@ typedef struct {
111
112
  ngx_str_t min_instances_source_file;
112
113
  ngx_str_t monitor_log_file_source_file;
113
114
  ngx_str_t nodejs_source_file;
115
+ ngx_str_t preload_bundler_source_file;
114
116
  ngx_str_t python_source_file;
115
117
  ngx_str_t request_queue_overflow_status_code_source_file;
116
118
  ngx_str_t restart_dir_source_file;
@@ -165,6 +167,7 @@ typedef struct {
165
167
  ngx_uint_t min_instances_source_line;
166
168
  ngx_uint_t monitor_log_file_source_line;
167
169
  ngx_uint_t nodejs_source_line;
170
+ ngx_uint_t preload_bundler_source_line;
168
171
  ngx_uint_t python_source_line;
169
172
  ngx_uint_t request_queue_overflow_status_code_source_line;
170
173
  ngx_uint_t restart_dir_source_line;
@@ -219,6 +222,7 @@ typedef struct {
219
222
  ngx_int_t min_instances_explicitly_set;
220
223
  ngx_int_t monitor_log_file_explicitly_set;
221
224
  ngx_int_t nodejs_explicitly_set;
225
+ ngx_int_t preload_bundler_explicitly_set;
222
226
  ngx_int_t python_explicitly_set;
223
227
  ngx_int_t request_queue_overflow_status_code_explicitly_set;
224
228
  ngx_int_t restart_dir_explicitly_set;
@@ -359,6 +359,7 @@ start_watchdog(ngx_cycle_t *cycle) {
359
359
  psg_json_value_set_str_ne (w_config, "server_software", NGINX_VER, strlen(NGINX_VER));
360
360
  psg_json_value_set_bool (w_config, "multi_app", 1);
361
361
  psg_json_value_set_bool (w_config, "default_load_shell_envvars", 1);
362
+ psg_json_value_set_bool (w_config, "default_preload_bundler", 0);
362
363
  psg_json_value_set_value (w_config, "config_manifest", -1, passenger_main_conf.manifest);
363
364
  psg_json_value_set_ngx_uint (w_config, "log_level", autogenerated_main_conf->log_level);
364
365
  psg_json_value_set_ngx_str_ne(w_config, "file_descriptor_log_target", &autogenerated_main_conf->file_descriptor_log_file);