passenger 5.2.3 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG +13 -0
- data/CONTRIBUTORS +5 -1
- data/build/agent.rb +22 -2
- data/build/cxx_tests.rb +41 -5
- data/build/misc.rb +4 -1
- data/build/support/cxx_dependency_map.rb +1746 -908
- data/build/support/vendor/cxx_hinted_parser/CxxHintedParser.sublime-project +8 -0
- data/build/support/vendor/cxx_hinted_parser/Gemfile +5 -0
- data/build/support/vendor/cxx_hinted_parser/Gemfile.lock +30 -0
- data/{src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core → build/support/vendor/cxx_hinted_parser}/LICENSE.md +1 -1
- data/build/support/vendor/cxx_hinted_parser/README.md +95 -0
- data/build/support/vendor/cxx_hinted_parser/Rakefile +4 -0
- data/{src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/initialize.rb → build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser.rb} +2 -9
- data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser/parser.rb +239 -0
- data/dev/ci/README.md +15 -2
- data/dev/ci/lib/set-container-envvars.sh +6 -0
- data/dev/ci/lib/setup-container.sh +4 -1
- data/dev/ci/scripts/debug-console-wrapper.sh +3 -1
- data/dev/ci/setup-host +5 -0
- data/dev/ci/tests/binaries/Jenkinsfile +105 -0
- data/dev/ci/tests/binaries/build-linux +38 -0
- data/dev/ci/tests/binaries/build-macos +40 -0
- data/dev/ci/tests/binaries/prepare-macos +38 -0
- data/dev/ci/tests/binaries/test-linux +45 -0
- data/dev/ci/tests/binaries/test-macos +38 -0
- data/dev/ci/tests/debian/Jenkinsfile +2 -2
- data/dev/ci/tests/rpm/Jenkinsfile +1 -1
- data/dev/configkit-schemas/index.json +3 -24
- data/dev/vagrant/nginx_rakefile +0 -1
- data/package.json +15 -5
- data/resources/templates/error_renderer/.editorconfig +19 -0
- data/resources/templates/error_renderer/with_details/README.md +9 -0
- data/resources/templates/error_renderer/with_details/dist/bundle.js +33 -0
- data/resources/templates/error_renderer/with_details/dist/styles.css +17 -0
- data/resources/templates/error_renderer/with_details/src/DetailsView.jsx +52 -0
- data/resources/templates/error_renderer/with_details/src/GetHelpView.jsx +61 -0
- data/resources/templates/error_renderer/with_details/src/JourneyView.css +50 -0
- data/resources/templates/error_renderer/with_details/src/JourneyView.jsx +621 -0
- data/resources/templates/error_renderer/with_details/src/PageMain.css +114 -0
- data/resources/templates/error_renderer/with_details/src/PageMain.jsx +136 -0
- data/resources/templates/error_renderer/with_details/src/ProblemDescriptionView.jsx +14 -0
- data/resources/templates/error_renderer/with_details/src/ProcessDetailsView.jsx +56 -0
- data/resources/templates/error_renderer/with_details/src/SolutionDescriptionView.css +5 -0
- data/resources/templates/error_renderer/with_details/src/SolutionDescriptionView.jsx +15 -0
- data/resources/templates/error_renderer/with_details/src/SummaryView.jsx +35 -0
- data/resources/templates/error_renderer/with_details/src/SystemComponentView.css +34 -0
- data/resources/templates/error_renderer/with_details/src/SystemComponentView.jsx +168 -0
- data/resources/templates/error_renderer/with_details/src/SystemComponentsView.css +13 -0
- data/resources/templates/error_renderer/with_details/src/SystemComponentsView.jsx +116 -0
- data/resources/templates/error_renderer/with_details/src/Tab.jsx +12 -0
- data/resources/templates/error_renderer/with_details/src/Tabs.jsx +104 -0
- data/resources/templates/error_renderer/with_details/src/bootstrap/bootstrap.css +3446 -0
- data/resources/templates/error_renderer/with_details/src/bootstrap/bootstrap.js +293 -0
- data/resources/templates/error_renderer/with_details/src/bootstrap/config.json +401 -0
- data/resources/templates/error_renderer/with_details/src/index.html.template +22 -0
- data/resources/templates/error_renderer/with_details/src/index.jsx +23 -0
- data/resources/templates/error_renderer/with_details/webpack.config.js +47 -0
- data/resources/templates/error_renderer/without_details/dist/bundle.js +1 -0
- data/resources/templates/error_renderer/without_details/dist/styles.css +1 -0
- data/resources/templates/{undisclosed_error.html.template → error_renderer/without_details/src/index.html.template} +7 -11
- data/resources/templates/error_renderer/without_details/src/index.js +1 -0
- data/resources/templates/{error_layout.css → error_renderer/without_details/src/main.css} +5 -2
- data/resources/templates/error_renderer/without_details/webpack.config.js +42 -0
- data/src/agent/AgentMain.cpp +3 -3
- data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +13 -0
- data/src/agent/Core/ApplicationPool/Common.h +3 -4
- data/src/agent/Core/ApplicationPool/Context.h +27 -17
- data/src/agent/Core/ApplicationPool/Group.h +3 -1
- data/src/agent/Core/ApplicationPool/Group/InitializationAndShutdown.cpp +2 -12
- data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +55 -10
- data/src/agent/Core/ApplicationPool/Group/LifetimeAndBasics.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/SpawningAndRestarting.cpp +13 -6
- data/src/agent/Core/ApplicationPool/Implementation.cpp +16 -100
- data/src/agent/Core/ApplicationPool/Options.h +8 -65
- data/src/agent/Core/ApplicationPool/Pool.h +4 -21
- data/src/agent/Core/ApplicationPool/Pool/AnalyticsCollection.cpp +1 -60
- data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +10 -13
- data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +3 -8
- data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +2 -34
- data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Process.cpp +17 -12
- data/src/agent/Core/ApplicationPool/Process.h +146 -93
- data/src/agent/Core/ApplicationPool/Session.h +2 -2
- data/src/agent/Core/ApplicationPool/Socket.h +28 -27
- data/src/agent/Core/Config.h +1 -3
- data/src/agent/Core/ConfigChange.cpp +2 -4
- data/src/agent/Core/Controller.h +2 -8
- data/src/agent/Core/Controller/BufferBody.cpp +0 -2
- data/src/agent/Core/Controller/CheckoutSession.cpp +12 -24
- data/src/agent/Core/Controller/Config.h +1 -9
- data/src/agent/Core/Controller/ForwardResponse.cpp +0 -34
- data/src/agent/Core/Controller/Hooks.cpp +0 -7
- data/src/agent/Core/Controller/InitRequest.cpp +0 -43
- data/src/agent/Core/Controller/InitializationAndShutdown.cpp +0 -4
- data/src/agent/Core/Controller/Request.h +1 -35
- data/src/agent/Core/Controller/SendRequest.cpp +0 -32
- data/src/agent/Core/CoreMain.cpp +19 -32
- data/src/agent/Core/SpawningKit/Config.h +329 -55
- data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +369 -0
- data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h.cxxcodebuilder +307 -0
- data/src/agent/Core/SpawningKit/Context.h +211 -0
- data/src/agent/Core/SpawningKit/DirectSpawner.h +112 -122
- data/src/agent/Core/SpawningKit/DummySpawner.h +59 -20
- data/src/agent/Core/SpawningKit/ErrorRenderer.h +117 -0
- data/src/agent/Core/SpawningKit/Exceptions.h +1157 -0
- data/src/agent/Core/SpawningKit/Factory.h +24 -17
- data/src/agent/Core/SpawningKit/{BackgroundIOCapturer.h → Handshake/BackgroundIOCapturer.h} +48 -18
- data/src/agent/Core/SpawningKit/Handshake/Perform.h +1650 -0
- data/src/agent/Core/SpawningKit/Handshake/Prepare.h +582 -0
- data/src/agent/Core/SpawningKit/Handshake/Session.h +91 -0
- data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +100 -0
- data/src/agent/Core/SpawningKit/Journey.h +561 -0
- data/src/agent/Core/SpawningKit/PipeWatcher.h +41 -18
- data/src/agent/Core/SpawningKit/README.md +534 -0
- data/src/agent/Core/SpawningKit/Result.h +182 -7
- data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h +69 -0
- data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h.cxxcodebuilder +110 -0
- data/src/agent/Core/SpawningKit/SmartSpawner.h +1027 -562
- data/src/agent/Core/SpawningKit/Spawner.h +70 -1134
- data/src/agent/Core/SpawningKit/UserSwitchingRules.h +3 -33
- data/src/agent/README.md +2 -3
- data/src/agent/Shared/ApiServerUtils.h +2 -3
- data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +932 -0
- data/src/agent/Watchdog/Config.h +1 -3
- data/src/agent/Watchdog/WatchdogMain.cpp +2 -1
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +5 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +5 -0
- data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +22 -13
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +5 -0
- data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +3 -0
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +13 -0
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -0
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +13 -0
- data/src/cxx_supportlib/Constants.h +3 -1
- data/src/cxx_supportlib/Exceptions.h +0 -121
- data/src/cxx_supportlib/LoggingKit/Implementation.cpp +7 -6
- data/src/cxx_supportlib/LoggingKit/Logging.h +3 -1
- data/src/cxx_supportlib/Utils.cpp +42 -0
- data/src/cxx_supportlib/Utils.h +7 -0
- data/src/cxx_supportlib/Utils/IOUtils.cpp +58 -0
- data/src/cxx_supportlib/Utils/IOUtils.h +13 -0
- data/src/cxx_supportlib/Utils/JsonUtils.h +130 -23
- data/src/cxx_supportlib/Utils/ScopeGuard.h +9 -4
- data/src/cxx_supportlib/Utils/StrIntUtils.cpp +7 -0
- data/src/cxx_supportlib/Utils/StrIntUtils.h +1 -0
- data/src/cxx_supportlib/Utils/SystemTime.h +1 -1
- data/src/cxx_supportlib/Utils/Timer.h +1 -1
- data/src/cxx_supportlib/WebSocketCommandReverseServer.h +6 -4
- data/src/cxx_supportlib/vendor-copy/adhoc_lve.h +1 -0
- data/src/helper-scripts/node-loader.js +54 -59
- data/src/helper-scripts/rack-loader.rb +63 -60
- data/src/helper-scripts/rack-preloader.rb +125 -72
- data/src/helper-scripts/wsgi-loader.py +100 -43
- data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +120 -112
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +15 -8
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +142 -142
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.c +26 -15
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.h +3 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +76 -70
- data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +114 -99
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +170 -156
- data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +38 -35
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +5 -1
- data/src/ruby_supportlib/phusion_passenger.rb +5 -5
- data/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb +14 -1
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +8 -0
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +0 -3
- data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +0 -1
- data/src/ruby_supportlib/phusion_passenger/constants.rb +2 -0
- data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +646 -238
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +117 -95
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +0 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +5 -1
- data/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb +92 -69
- data/src/ruby_supportlib/phusion_passenger/public_api.rb +0 -17
- data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +0 -3
- data/src/ruby_supportlib/phusion_passenger/request_handler.rb +4 -5
- data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +0 -22
- metadata +64 -67
- data/resources/templates/error_layout.html.template +0 -86
- data/resources/templates/general_error.html.template +0 -1
- data/resources/templates/general_error_with_html.html.template +0 -1
- data/src/agent/Core/ApplicationPool/ErrorRenderer.h +0 -131
- data/src/agent/Core/SpawningKit/Options.h +0 -41
- data/src/agent/Core/UnionStation/Connection.h +0 -173
- data/src/agent/Core/UnionStation/Context.h +0 -536
- data/src/agent/Core/UnionStation/StopwatchLog.h +0 -147
- data/src/agent/Core/UnionStation/Transaction.h +0 -249
- data/src/agent/SpawnPreparer/SpawnPreparerMain.cpp +0 -208
- data/src/cxx_supportlib/UnionStationFilterSupport.cpp +0 -67
- data/src/cxx_supportlib/UnionStationFilterSupport.h +0 -1622
- data/src/nodejs_supportlib/phusion_passenger/log_express.js +0 -106
- data/src/nodejs_supportlib/phusion_passenger/log_mongodb.js +0 -202
- data/src/nodejs_supportlib/phusion_passenger/ustreporter.js +0 -227
- data/src/nodejs_supportlib/phusion_passenger/ustrouter_connector.js +0 -448
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/CONFIG.md +0 -37
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/Gemfile +0 -17
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/Gemfile.lock +0 -59
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/README-API.md +0 -5
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/README.md +0 -117
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/Rakefile +0 -115
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core.rb +0 -423
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/api.rb +0 -238
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/connection.rb +0 -67
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/context.rb +0 -281
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/lock.rb +0 -62
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/log.rb +0 -66
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/message_channel.rb +0 -157
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter.rb +0 -150
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/basics.rb +0 -199
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/controllers.rb +0 -187
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/misc.rb +0 -303
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/view_rendering.rb +0 -91
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/simple_json.rb +0 -396
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/spec_helper.rb +0 -279
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/time_point.rb +0 -39
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/transaction.rb +0 -173
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/utils.rb +0 -177
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/version.rb +0 -32
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/version_data.rb +0 -44
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.example +0 -16
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.travis +0 -20
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.travis-with-sudo +0 -18
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/union_station_hooks_core.gemspec +0 -23
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Gemfile +0 -14
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Gemfile.lock +0 -45
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/LICENSE.md +0 -19
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/README.md +0 -104
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Rakefile +0 -160
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails.rb +0 -200
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/action_controller_extension.rb +0 -45
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/action_view_subscriber.rb +0 -55
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/active_record_subscriber.rb +0 -41
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/active_support_benchmarkable_extension.rb +0 -47
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/active_support_cache_subscriber.rb +0 -79
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/exception_logger.rb +0 -57
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/version.rb +0 -32
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/version_data.rb +0 -44
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/union_station_hooks_rails.gemspec +0 -34
@@ -420,18 +420,18 @@ find_or_create_manifest_app_and_loc_options_containers(manifest_gen_ctx_t *ctx,
|
|
420
420
|
*app_options_container = psg_json_value_get(app_config_container, "options", -1);
|
421
421
|
*loc_options_container = psg_json_value_get(app_config_container, "default_location_configuration", -1);
|
422
422
|
|
423
|
-
/* Create a default value for
|
424
|
-
* if we just created this config container
|
423
|
+
/* Create a default value for passenger_app_group_name and
|
424
|
+
* passenger_app_root if we just created this config container
|
425
425
|
*/
|
426
426
|
if (psg_json_value_size(*app_options_container) == 0) {
|
427
|
-
|
427
|
+
add_manifest_options_container_inferred_default_str(ctx,
|
428
428
|
*app_options_container,
|
429
429
|
"passenger_app_group_name", -1,
|
430
430
|
(const char *) app_group_name.data, app_group_name.len);
|
431
431
|
|
432
432
|
default_app_root.data = infer_default_app_root(
|
433
433
|
ctx, clcf, &default_app_root.len);
|
434
|
-
|
434
|
+
add_manifest_options_container_inferred_default_str(ctx,
|
435
435
|
*app_options_container,
|
436
436
|
"passenger_app_root", -1,
|
437
437
|
(const char *) default_app_root.data, default_app_root.len);
|
@@ -551,8 +551,9 @@ add_manifest_options_container_dynamic_default(manifest_gen_ctx_t *ctx,
|
|
551
551
|
}
|
552
552
|
|
553
553
|
static PsgJsonValue *
|
554
|
-
|
555
|
-
PsgJsonValue *options_container, const char *
|
554
|
+
add_manifest_options_container_default(manifest_gen_ctx_t *ctx,
|
555
|
+
PsgJsonValue *options_container, const char *default_type,
|
556
|
+
const char *option_name, size_t option_name_len)
|
556
557
|
{
|
557
558
|
PsgJsonValue *option_container, *hierarchy, *hierarchy_member, *source, *result;
|
558
559
|
|
@@ -563,7 +564,7 @@ add_manifest_options_container_static_default(manifest_gen_ctx_t *ctx,
|
|
563
564
|
hierarchy = psg_json_value_get(option_container, "value_hierarchy", -1);
|
564
565
|
|
565
566
|
source = psg_json_value_new_with_type(PSG_JSON_VALUE_TYPE_OBJECT);
|
566
|
-
psg_json_value_set_str(source, "type",
|
567
|
+
psg_json_value_set_str(source, "type", default_type, -1);
|
567
568
|
|
568
569
|
hierarchy_member = psg_json_value_new_with_type(PSG_JSON_VALUE_TYPE_OBJECT);
|
569
570
|
psg_json_value_set_value(hierarchy_member, "source", -1, source);
|
@@ -581,8 +582,8 @@ add_manifest_options_container_static_default_str(manifest_gen_ctx_t *ctx,
|
|
581
582
|
PsgJsonValue *options_container, const char *option_name, size_t option_name_len,
|
582
583
|
const char *value, size_t value_len)
|
583
584
|
{
|
584
|
-
PsgJsonValue *hierarchy_member =
|
585
|
-
ctx, options_container, option_name, option_name_len);
|
585
|
+
PsgJsonValue *hierarchy_member = add_manifest_options_container_default(
|
586
|
+
ctx, options_container, "default", option_name, option_name_len);
|
586
587
|
psg_json_value_set_str(hierarchy_member, "value", value, value_len);
|
587
588
|
}
|
588
589
|
|
@@ -591,8 +592,8 @@ add_manifest_options_container_static_default_int(manifest_gen_ctx_t *ctx,
|
|
591
592
|
PsgJsonValue *options_container, const char *option_name, size_t option_name_len,
|
592
593
|
int value)
|
593
594
|
{
|
594
|
-
PsgJsonValue *hierarchy_member =
|
595
|
-
ctx, options_container, option_name, option_name_len);
|
595
|
+
PsgJsonValue *hierarchy_member = add_manifest_options_container_default(
|
596
|
+
ctx, options_container, "default", option_name, option_name_len);
|
596
597
|
psg_json_value_set_int(hierarchy_member, "value", value);
|
597
598
|
}
|
598
599
|
|
@@ -601,8 +602,8 @@ add_manifest_options_container_static_default_uint(manifest_gen_ctx_t *ctx,
|
|
601
602
|
PsgJsonValue *options_container, const char *option_name, size_t option_name_len,
|
602
603
|
unsigned int value)
|
603
604
|
{
|
604
|
-
PsgJsonValue *hierarchy_member =
|
605
|
-
ctx, options_container, option_name, option_name_len);
|
605
|
+
PsgJsonValue *hierarchy_member = add_manifest_options_container_default(
|
606
|
+
ctx, options_container, "default", option_name, option_name_len);
|
606
607
|
psg_json_value_set_uint(hierarchy_member, "value", value);
|
607
608
|
}
|
608
609
|
|
@@ -611,11 +612,21 @@ add_manifest_options_container_static_default_bool(manifest_gen_ctx_t *ctx,
|
|
611
612
|
PsgJsonValue *options_container, const char *option_name, size_t option_name_len,
|
612
613
|
int value)
|
613
614
|
{
|
614
|
-
PsgJsonValue *hierarchy_member =
|
615
|
-
ctx, options_container, option_name, option_name_len);
|
615
|
+
PsgJsonValue *hierarchy_member = add_manifest_options_container_default(
|
616
|
+
ctx, options_container, "default", option_name, option_name_len);
|
616
617
|
psg_json_value_set_bool(hierarchy_member, "value", value);
|
617
618
|
}
|
618
619
|
|
620
|
+
static void
|
621
|
+
add_manifest_options_container_inferred_default_str(manifest_gen_ctx_t *ctx,
|
622
|
+
PsgJsonValue *options_container, const char *option_name, size_t option_name_len,
|
623
|
+
const char *value, size_t value_len)
|
624
|
+
{
|
625
|
+
PsgJsonValue *hierarchy_member = add_manifest_options_container_default(
|
626
|
+
ctx, options_container, "inferred-default", option_name, option_name_len);
|
627
|
+
psg_json_value_set_str(hierarchy_member, "value", value, value_len);
|
628
|
+
}
|
629
|
+
|
619
630
|
static void
|
620
631
|
manifest_inherit_application_value_hierarchies(manifest_gen_ctx_t *ctx) {
|
621
632
|
PsgJsonValue *app_config_container, *options_container, *option_container, *default_app_config;
|
@@ -88,6 +88,9 @@ static void add_manifest_options_container_static_default_uint(manifest_gen_ctx_
|
|
88
88
|
static void add_manifest_options_container_static_default_bool(manifest_gen_ctx_t *ctx,
|
89
89
|
PsgJsonValue *options_container, const char *option_name, size_t option_name_len,
|
90
90
|
int value);
|
91
|
+
static void add_manifest_options_container_inferred_default_str(manifest_gen_ctx_t *ctx,
|
92
|
+
PsgJsonValue *options_container, const char *option_name, size_t option_name_len,
|
93
|
+
const char *value, size_t value_len);
|
91
94
|
|
92
95
|
static void manifest_inherit_application_value_hierarchies(manifest_gen_ctx_t *ctx);
|
93
96
|
static void manifest_inherit_location_value_hierarchies(manifest_gen_ctx_t *ctx);
|
@@ -41,7 +41,7 @@
|
|
41
41
|
static void
|
42
42
|
passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *conf) {
|
43
43
|
conf->app_file_descriptor_ulimit = NGX_CONF_UNSET_UINT;
|
44
|
-
conf->
|
44
|
+
conf->max_instances_per_app = NGX_CONF_UNSET_UINT;
|
45
45
|
conf->ruby.data = NULL;
|
46
46
|
conf->ruby.len = 0;
|
47
47
|
conf->python.data = NULL;
|
@@ -54,12 +54,7 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
|
|
54
54
|
conf->environment.len = 0;
|
55
55
|
conf->friendly_error_pages = NGX_CONF_UNSET;
|
56
56
|
conf->min_instances = NGX_CONF_UNSET_UINT;
|
57
|
-
conf->
|
58
|
-
conf->max_requests = NGX_CONF_UNSET_UINT;
|
59
|
-
conf->start_timeout = NGX_CONF_UNSET;
|
60
|
-
conf->base_uris = NGX_CONF_UNSET_PTR;
|
61
|
-
conf->document_root.data = NULL;
|
62
|
-
conf->document_root.len = 0;
|
57
|
+
conf->start_timeout = NGX_CONF_UNSET_UINT;
|
63
58
|
conf->user.data = NULL;
|
64
59
|
conf->user.len = 0;
|
65
60
|
conf->group.data = NULL;
|
@@ -74,35 +69,42 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
|
|
74
69
|
conf->debugger = NGX_CONF_UNSET;
|
75
70
|
conf->max_preloader_idle_time = NGX_CONF_UNSET;
|
76
71
|
conf->env_vars = NULL;
|
77
|
-
conf->headers_hash_max_size = NGX_CONF_UNSET_UINT;
|
78
|
-
conf->headers_hash_bucket_size = NGX_CONF_UNSET_UINT;
|
79
72
|
conf->spawn_method.data = NULL;
|
80
73
|
conf->spawn_method.len = 0;
|
81
74
|
conf->load_shell_envvars = NGX_CONF_UNSET;
|
82
75
|
conf->max_request_queue_size = NGX_CONF_UNSET_UINT;
|
83
|
-
conf->request_queue_overflow_status_code = NGX_CONF_UNSET;
|
84
|
-
conf->restart_dir.data = NULL;
|
85
|
-
conf->restart_dir.len = 0;
|
86
76
|
conf->app_type.data = NULL;
|
87
77
|
conf->app_type.len = 0;
|
88
78
|
conf->startup_file.data = NULL;
|
89
79
|
conf->startup_file.len = 0;
|
80
|
+
conf->restart_dir.data = NULL;
|
81
|
+
conf->restart_dir.len = 0;
|
82
|
+
conf->abort_websockets_on_process_shutdown = NGX_CONF_UNSET;
|
83
|
+
conf->force_max_concurrent_requests_per_process = NGX_CONF_UNSET;
|
84
|
+
conf->enabled = NGX_CONF_UNSET;
|
85
|
+
conf->max_requests = NGX_CONF_UNSET_UINT;
|
86
|
+
conf->base_uris = NGX_CONF_UNSET_PTR;
|
87
|
+
conf->document_root.data = NULL;
|
88
|
+
conf->document_root.len = 0;
|
89
|
+
conf->headers_hash_max_size = NGX_CONF_UNSET_UINT;
|
90
|
+
conf->headers_hash_bucket_size = NGX_CONF_UNSET_UINT;
|
91
|
+
conf->request_queue_overflow_status_code = NGX_CONF_UNSET;
|
90
92
|
conf->sticky_sessions = NGX_CONF_UNSET;
|
91
93
|
conf->sticky_sessions_cookie_name.data = NULL;
|
92
94
|
conf->sticky_sessions_cookie_name.len = 0;
|
93
95
|
conf->vary_turbocache_by_cookie.data = NULL;
|
94
96
|
conf->vary_turbocache_by_cookie.len = 0;
|
95
|
-
conf->
|
96
|
-
conf->
|
97
|
+
conf->app_log_file.data = NULL;
|
98
|
+
conf->app_log_file.len = 0;
|
97
99
|
|
98
100
|
conf->app_file_descriptor_ulimit_source_file.data = NULL;
|
99
101
|
conf->app_file_descriptor_ulimit_source_file.len = 0;
|
100
102
|
conf->app_file_descriptor_ulimit_source_line = 0;
|
101
103
|
conf->app_file_descriptor_ulimit_explicitly_set = 0;
|
102
|
-
conf->
|
103
|
-
conf->
|
104
|
-
conf->
|
105
|
-
conf->
|
104
|
+
conf->max_instances_per_app_source_file.data = NULL;
|
105
|
+
conf->max_instances_per_app_source_file.len = 0;
|
106
|
+
conf->max_instances_per_app_source_line = 0;
|
107
|
+
conf->max_instances_per_app_explicitly_set = 0;
|
106
108
|
conf->ruby_source_file.data = NULL;
|
107
109
|
conf->ruby_source_file.len = 0;
|
108
110
|
conf->ruby_source_line = 0;
|
@@ -131,26 +133,10 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
|
|
131
133
|
conf->min_instances_source_file.len = 0;
|
132
134
|
conf->min_instances_source_line = 0;
|
133
135
|
conf->min_instances_explicitly_set = 0;
|
134
|
-
conf->max_instances_per_app_source_file.data = NULL;
|
135
|
-
conf->max_instances_per_app_source_file.len = 0;
|
136
|
-
conf->max_instances_per_app_source_line = 0;
|
137
|
-
conf->max_instances_per_app_explicitly_set = 0;
|
138
|
-
conf->max_requests_source_file.data = NULL;
|
139
|
-
conf->max_requests_source_file.len = 0;
|
140
|
-
conf->max_requests_source_line = 0;
|
141
|
-
conf->max_requests_explicitly_set = 0;
|
142
136
|
conf->start_timeout_source_file.data = NULL;
|
143
137
|
conf->start_timeout_source_file.len = 0;
|
144
138
|
conf->start_timeout_source_line = 0;
|
145
139
|
conf->start_timeout_explicitly_set = 0;
|
146
|
-
conf->base_uris_source_file.data = NULL;
|
147
|
-
conf->base_uris_source_file.len = 0;
|
148
|
-
conf->base_uris_source_line = 0;
|
149
|
-
conf->base_uris_explicitly_set = 0;
|
150
|
-
conf->document_root_source_file.data = NULL;
|
151
|
-
conf->document_root_source_file.len = 0;
|
152
|
-
conf->document_root_source_line = 0;
|
153
|
-
conf->document_root_explicitly_set = 0;
|
154
140
|
conf->user_source_file.data = NULL;
|
155
141
|
conf->user_source_file.len = 0;
|
156
142
|
conf->user_source_line = 0;
|
@@ -183,14 +169,62 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
|
|
183
169
|
conf->max_preloader_idle_time_source_file.len = 0;
|
184
170
|
conf->max_preloader_idle_time_source_line = 0;
|
185
171
|
conf->max_preloader_idle_time_explicitly_set = 0;
|
186
|
-
conf->upstream_config_ignore_headers_source_file.data = NULL;
|
187
|
-
conf->upstream_config_ignore_headers_source_file.len = 0;
|
188
|
-
conf->upstream_config_ignore_headers_source_line = 0;
|
189
|
-
conf->upstream_config_ignore_headers_explicitly_set = 0;
|
190
172
|
conf->env_vars_source_file.data = NULL;
|
191
173
|
conf->env_vars_source_file.len = 0;
|
192
174
|
conf->env_vars_source_line = 0;
|
193
175
|
conf->env_vars_explicitly_set = 0;
|
176
|
+
conf->spawn_method_source_file.data = NULL;
|
177
|
+
conf->spawn_method_source_file.len = 0;
|
178
|
+
conf->spawn_method_source_line = 0;
|
179
|
+
conf->spawn_method_explicitly_set = 0;
|
180
|
+
conf->load_shell_envvars_source_file.data = NULL;
|
181
|
+
conf->load_shell_envvars_source_file.len = 0;
|
182
|
+
conf->load_shell_envvars_source_line = 0;
|
183
|
+
conf->load_shell_envvars_explicitly_set = 0;
|
184
|
+
conf->max_request_queue_size_source_file.data = NULL;
|
185
|
+
conf->max_request_queue_size_source_file.len = 0;
|
186
|
+
conf->max_request_queue_size_source_line = 0;
|
187
|
+
conf->max_request_queue_size_explicitly_set = 0;
|
188
|
+
conf->app_type_source_file.data = NULL;
|
189
|
+
conf->app_type_source_file.len = 0;
|
190
|
+
conf->app_type_source_line = 0;
|
191
|
+
conf->app_type_explicitly_set = 0;
|
192
|
+
conf->startup_file_source_file.data = NULL;
|
193
|
+
conf->startup_file_source_file.len = 0;
|
194
|
+
conf->startup_file_source_line = 0;
|
195
|
+
conf->startup_file_explicitly_set = 0;
|
196
|
+
conf->restart_dir_source_file.data = NULL;
|
197
|
+
conf->restart_dir_source_file.len = 0;
|
198
|
+
conf->restart_dir_source_line = 0;
|
199
|
+
conf->restart_dir_explicitly_set = 0;
|
200
|
+
conf->abort_websockets_on_process_shutdown_source_file.data = NULL;
|
201
|
+
conf->abort_websockets_on_process_shutdown_source_file.len = 0;
|
202
|
+
conf->abort_websockets_on_process_shutdown_source_line = 0;
|
203
|
+
conf->abort_websockets_on_process_shutdown_explicitly_set = 0;
|
204
|
+
conf->force_max_concurrent_requests_per_process_source_file.data = NULL;
|
205
|
+
conf->force_max_concurrent_requests_per_process_source_file.len = 0;
|
206
|
+
conf->force_max_concurrent_requests_per_process_source_line = 0;
|
207
|
+
conf->force_max_concurrent_requests_per_process_explicitly_set = 0;
|
208
|
+
conf->enabled_source_file.data = NULL;
|
209
|
+
conf->enabled_source_file.len = 0;
|
210
|
+
conf->enabled_source_line = 0;
|
211
|
+
conf->enabled_explicitly_set = 0;
|
212
|
+
conf->max_requests_source_file.data = NULL;
|
213
|
+
conf->max_requests_source_file.len = 0;
|
214
|
+
conf->max_requests_source_line = 0;
|
215
|
+
conf->max_requests_explicitly_set = 0;
|
216
|
+
conf->base_uris_source_file.data = NULL;
|
217
|
+
conf->base_uris_source_file.len = 0;
|
218
|
+
conf->base_uris_source_line = 0;
|
219
|
+
conf->base_uris_explicitly_set = 0;
|
220
|
+
conf->document_root_source_file.data = NULL;
|
221
|
+
conf->document_root_source_file.len = 0;
|
222
|
+
conf->document_root_source_line = 0;
|
223
|
+
conf->document_root_explicitly_set = 0;
|
224
|
+
conf->upstream_config_ignore_headers_source_file.data = NULL;
|
225
|
+
conf->upstream_config_ignore_headers_source_file.len = 0;
|
226
|
+
conf->upstream_config_ignore_headers_source_line = 0;
|
227
|
+
conf->upstream_config_ignore_headers_explicitly_set = 0;
|
194
228
|
conf->headers_source_source_file.data = NULL;
|
195
229
|
conf->headers_source_source_file.len = 0;
|
196
230
|
conf->headers_source_source_line = 0;
|
@@ -235,34 +269,10 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
|
|
235
269
|
conf->upstream_config_intercept_errors_source_file.len = 0;
|
236
270
|
conf->upstream_config_intercept_errors_source_line = 0;
|
237
271
|
conf->upstream_config_intercept_errors_explicitly_set = 0;
|
238
|
-
conf->spawn_method_source_file.data = NULL;
|
239
|
-
conf->spawn_method_source_file.len = 0;
|
240
|
-
conf->spawn_method_source_line = 0;
|
241
|
-
conf->spawn_method_explicitly_set = 0;
|
242
|
-
conf->load_shell_envvars_source_file.data = NULL;
|
243
|
-
conf->load_shell_envvars_source_file.len = 0;
|
244
|
-
conf->load_shell_envvars_source_line = 0;
|
245
|
-
conf->load_shell_envvars_explicitly_set = 0;
|
246
|
-
conf->max_request_queue_size_source_file.data = NULL;
|
247
|
-
conf->max_request_queue_size_source_file.len = 0;
|
248
|
-
conf->max_request_queue_size_source_line = 0;
|
249
|
-
conf->max_request_queue_size_explicitly_set = 0;
|
250
272
|
conf->request_queue_overflow_status_code_source_file.data = NULL;
|
251
273
|
conf->request_queue_overflow_status_code_source_file.len = 0;
|
252
274
|
conf->request_queue_overflow_status_code_source_line = 0;
|
253
275
|
conf->request_queue_overflow_status_code_explicitly_set = 0;
|
254
|
-
conf->restart_dir_source_file.data = NULL;
|
255
|
-
conf->restart_dir_source_file.len = 0;
|
256
|
-
conf->restart_dir_source_line = 0;
|
257
|
-
conf->restart_dir_explicitly_set = 0;
|
258
|
-
conf->app_type_source_file.data = NULL;
|
259
|
-
conf->app_type_source_file.len = 0;
|
260
|
-
conf->app_type_source_line = 0;
|
261
|
-
conf->app_type_explicitly_set = 0;
|
262
|
-
conf->startup_file_source_file.data = NULL;
|
263
|
-
conf->startup_file_source_file.len = 0;
|
264
|
-
conf->startup_file_source_line = 0;
|
265
|
-
conf->startup_file_explicitly_set = 0;
|
266
276
|
conf->sticky_sessions_source_file.data = NULL;
|
267
277
|
conf->sticky_sessions_source_file.len = 0;
|
268
278
|
conf->sticky_sessions_source_line = 0;
|
@@ -275,13 +285,9 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
|
|
275
285
|
conf->vary_turbocache_by_cookie_source_file.len = 0;
|
276
286
|
conf->vary_turbocache_by_cookie_source_line = 0;
|
277
287
|
conf->vary_turbocache_by_cookie_explicitly_set = 0;
|
278
|
-
conf->
|
279
|
-
conf->
|
280
|
-
conf->
|
281
|
-
conf->
|
282
|
-
conf->force_max_concurrent_requests_per_process_source_file.data = NULL;
|
283
|
-
conf->force_max_concurrent_requests_per_process_source_file.len = 0;
|
284
|
-
conf->force_max_concurrent_requests_per_process_source_line = 0;
|
285
|
-
conf->force_max_concurrent_requests_per_process_explicitly_set = 0;
|
288
|
+
conf->app_log_file_source_file.data = NULL;
|
289
|
+
conf->app_log_file_source_file.len = 0;
|
290
|
+
conf->app_log_file_source_line = 0;
|
291
|
+
conf->app_log_file_explicitly_set = 0;
|
286
292
|
}
|
287
293
|
|
@@ -59,6 +59,16 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
|
|
59
59
|
len += sizeof("\r\n") - 1;
|
60
60
|
}
|
61
61
|
|
62
|
+
if (conf->autogenerated.max_instances_per_app != NGX_CONF_UNSET_UINT) {
|
63
|
+
end = ngx_snprintf(int_buf,
|
64
|
+
sizeof(int_buf) - 1,
|
65
|
+
"%ui",
|
66
|
+
conf->autogenerated.max_instances_per_app);
|
67
|
+
len += sizeof("!~PASSENGER_MAX_PROCESSES: ") - 1;
|
68
|
+
len += end - int_buf;
|
69
|
+
len += sizeof("\r\n") - 1;
|
70
|
+
}
|
71
|
+
|
62
72
|
if (conf->autogenerated.ruby.data != NULL) {
|
63
73
|
len += sizeof("!~PASSENGER_RUBY: ") - 1;
|
64
74
|
len += conf->autogenerated.ruby.len;
|
@@ -106,30 +116,10 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
|
|
106
116
|
len += sizeof("\r\n") - 1;
|
107
117
|
}
|
108
118
|
|
109
|
-
if (conf->autogenerated.
|
110
|
-
end = ngx_snprintf(int_buf,
|
111
|
-
sizeof(int_buf) - 1,
|
112
|
-
"%ui",
|
113
|
-
conf->autogenerated.max_instances_per_app);
|
114
|
-
len += sizeof("!~PASSENGER_MAX_PROCESSES: ") - 1;
|
115
|
-
len += end - int_buf;
|
116
|
-
len += sizeof("\r\n") - 1;
|
117
|
-
}
|
118
|
-
|
119
|
-
if (conf->autogenerated.max_requests != NGX_CONF_UNSET_UINT) {
|
119
|
+
if (conf->autogenerated.start_timeout != NGX_CONF_UNSET_UINT) {
|
120
120
|
end = ngx_snprintf(int_buf,
|
121
121
|
sizeof(int_buf) - 1,
|
122
122
|
"%ui",
|
123
|
-
conf->autogenerated.max_requests);
|
124
|
-
len += sizeof("!~PASSENGER_MAX_REQUESTS: ") - 1;
|
125
|
-
len += end - int_buf;
|
126
|
-
len += sizeof("\r\n") - 1;
|
127
|
-
}
|
128
|
-
|
129
|
-
if (conf->autogenerated.start_timeout != NGX_CONF_UNSET) {
|
130
|
-
end = ngx_snprintf(int_buf,
|
131
|
-
sizeof(int_buf) - 1,
|
132
|
-
"%d",
|
133
123
|
conf->autogenerated.start_timeout);
|
134
124
|
len += sizeof("!~PASSENGER_START_TIMEOUT: ") - 1;
|
135
125
|
len += end - int_buf;
|
@@ -206,25 +196,52 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
|
|
206
196
|
len += sizeof("\r\n") - 1;
|
207
197
|
}
|
208
198
|
|
209
|
-
if (conf->autogenerated.
|
199
|
+
if (conf->autogenerated.startup_file.data != NULL) {
|
200
|
+
len += sizeof("!~PASSENGER_STARTUP_FILE: ") - 1;
|
201
|
+
len += conf->autogenerated.startup_file.len;
|
202
|
+
len += sizeof("\r\n") - 1;
|
203
|
+
}
|
204
|
+
|
205
|
+
if (conf->autogenerated.restart_dir.data != NULL) {
|
206
|
+
len += sizeof("!~PASSENGER_RESTART_DIR: ") - 1;
|
207
|
+
len += conf->autogenerated.restart_dir.len;
|
208
|
+
len += sizeof("\r\n") - 1;
|
209
|
+
}
|
210
|
+
|
211
|
+
if (conf->autogenerated.abort_websockets_on_process_shutdown != NGX_CONF_UNSET) {
|
212
|
+
len += sizeof("!~PASSENGER_ABORT_WEBSOCKETS_ON_PROCESS_SHUTDOWN: ") - 1;
|
213
|
+
len += conf->autogenerated.abort_websockets_on_process_shutdown
|
214
|
+
? sizeof("t\r\n") - 1
|
215
|
+
: sizeof("f\r\n") - 1;
|
216
|
+
}
|
217
|
+
|
218
|
+
if (conf->autogenerated.force_max_concurrent_requests_per_process != NGX_CONF_UNSET) {
|
210
219
|
end = ngx_snprintf(int_buf,
|
211
220
|
sizeof(int_buf) - 1,
|
212
221
|
"%d",
|
213
|
-
conf->autogenerated.
|
214
|
-
len += sizeof("!~
|
222
|
+
conf->autogenerated.force_max_concurrent_requests_per_process);
|
223
|
+
len += sizeof("!~PASSENGER_FORCE_MAX_CONCURRENT_REQUESTS_PER_PROCESS: ") - 1;
|
215
224
|
len += end - int_buf;
|
216
225
|
len += sizeof("\r\n") - 1;
|
217
226
|
}
|
218
227
|
|
219
|
-
if (conf->autogenerated.
|
220
|
-
|
221
|
-
|
228
|
+
if (conf->autogenerated.max_requests != NGX_CONF_UNSET_UINT) {
|
229
|
+
end = ngx_snprintf(int_buf,
|
230
|
+
sizeof(int_buf) - 1,
|
231
|
+
"%ui",
|
232
|
+
conf->autogenerated.max_requests);
|
233
|
+
len += sizeof("!~PASSENGER_MAX_REQUESTS: ") - 1;
|
234
|
+
len += end - int_buf;
|
222
235
|
len += sizeof("\r\n") - 1;
|
223
236
|
}
|
224
237
|
|
225
|
-
if (conf->autogenerated.
|
226
|
-
|
227
|
-
|
238
|
+
if (conf->autogenerated.request_queue_overflow_status_code != NGX_CONF_UNSET) {
|
239
|
+
end = ngx_snprintf(int_buf,
|
240
|
+
sizeof(int_buf) - 1,
|
241
|
+
"%d",
|
242
|
+
conf->autogenerated.request_queue_overflow_status_code);
|
243
|
+
len += sizeof("!~PASSENGER_REQUEST_QUEUE_OVERFLOW_STATUS_CODE: ") - 1;
|
244
|
+
len += end - int_buf;
|
228
245
|
len += sizeof("\r\n") - 1;
|
229
246
|
}
|
230
247
|
|
@@ -247,20 +264,9 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
|
|
247
264
|
len += sizeof("\r\n") - 1;
|
248
265
|
}
|
249
266
|
|
250
|
-
if (conf->autogenerated.
|
251
|
-
len += sizeof("!~
|
252
|
-
len += conf->autogenerated.
|
253
|
-
? sizeof("t\r\n") - 1
|
254
|
-
: sizeof("f\r\n") - 1;
|
255
|
-
}
|
256
|
-
|
257
|
-
if (conf->autogenerated.force_max_concurrent_requests_per_process != NGX_CONF_UNSET) {
|
258
|
-
end = ngx_snprintf(int_buf,
|
259
|
-
sizeof(int_buf) - 1,
|
260
|
-
"%d",
|
261
|
-
conf->autogenerated.force_max_concurrent_requests_per_process);
|
262
|
-
len += sizeof("!~PASSENGER_FORCE_MAX_CONCURRENT_REQUESTS_PER_PROCESS: ") - 1;
|
263
|
-
len += end - int_buf;
|
267
|
+
if (conf->autogenerated.app_log_file.data != NULL) {
|
268
|
+
len += sizeof("!~PASSENGER_APP_LOG_FILE: ") - 1;
|
269
|
+
len += conf->autogenerated.app_log_file.len;
|
264
270
|
len += sizeof("\r\n") - 1;
|
265
271
|
}
|
266
272
|
|
@@ -282,6 +288,17 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
|
|
282
288
|
pos = ngx_copy(pos, int_buf, end - int_buf);
|
283
289
|
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
284
290
|
}
|
291
|
+
if (conf->autogenerated.max_instances_per_app != NGX_CONF_UNSET_UINT) {
|
292
|
+
pos = ngx_copy(pos,
|
293
|
+
"!~PASSENGER_MAX_PROCESSES: ",
|
294
|
+
sizeof("!~PASSENGER_MAX_PROCESSES: ") - 1);
|
295
|
+
end = ngx_snprintf(int_buf,
|
296
|
+
sizeof(int_buf) - 1,
|
297
|
+
"%ui",
|
298
|
+
conf->autogenerated.max_instances_per_app);
|
299
|
+
pos = ngx_copy(pos, int_buf, end - int_buf);
|
300
|
+
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
301
|
+
}
|
285
302
|
if (conf->autogenerated.ruby.data != NULL) {
|
286
303
|
pos = ngx_copy(pos,
|
287
304
|
"!~PASSENGER_RUBY: ",
|
@@ -349,35 +366,13 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
|
|
349
366
|
pos = ngx_copy(pos, int_buf, end - int_buf);
|
350
367
|
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
351
368
|
}
|
352
|
-
if (conf->autogenerated.
|
353
|
-
pos = ngx_copy(pos,
|
354
|
-
"!~PASSENGER_MAX_PROCESSES: ",
|
355
|
-
sizeof("!~PASSENGER_MAX_PROCESSES: ") - 1);
|
356
|
-
end = ngx_snprintf(int_buf,
|
357
|
-
sizeof(int_buf) - 1,
|
358
|
-
"%ui",
|
359
|
-
conf->autogenerated.max_instances_per_app);
|
360
|
-
pos = ngx_copy(pos, int_buf, end - int_buf);
|
361
|
-
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
362
|
-
}
|
363
|
-
if (conf->autogenerated.max_requests != NGX_CONF_UNSET_UINT) {
|
364
|
-
pos = ngx_copy(pos,
|
365
|
-
"!~PASSENGER_MAX_REQUESTS: ",
|
366
|
-
sizeof("!~PASSENGER_MAX_REQUESTS: ") - 1);
|
367
|
-
end = ngx_snprintf(int_buf,
|
368
|
-
sizeof(int_buf) - 1,
|
369
|
-
"%ui",
|
370
|
-
conf->autogenerated.max_requests);
|
371
|
-
pos = ngx_copy(pos, int_buf, end - int_buf);
|
372
|
-
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
373
|
-
}
|
374
|
-
if (conf->autogenerated.start_timeout != NGX_CONF_UNSET) {
|
369
|
+
if (conf->autogenerated.start_timeout != NGX_CONF_UNSET_UINT) {
|
375
370
|
pos = ngx_copy(pos,
|
376
371
|
"!~PASSENGER_START_TIMEOUT: ",
|
377
372
|
sizeof("!~PASSENGER_START_TIMEOUT: ") - 1);
|
378
373
|
end = ngx_snprintf(int_buf,
|
379
374
|
sizeof(int_buf) - 1,
|
380
|
-
"%
|
375
|
+
"%ui",
|
381
376
|
conf->autogenerated.start_timeout);
|
382
377
|
pos = ngx_copy(pos, int_buf, end - int_buf);
|
383
378
|
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
@@ -480,15 +475,13 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
|
|
480
475
|
pos = ngx_copy(pos, int_buf, end - int_buf);
|
481
476
|
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
482
477
|
}
|
483
|
-
if (conf->autogenerated.
|
478
|
+
if (conf->autogenerated.startup_file.data != NULL) {
|
484
479
|
pos = ngx_copy(pos,
|
485
|
-
"!~
|
486
|
-
sizeof("!~
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
conf->autogenerated.request_queue_overflow_status_code);
|
491
|
-
pos = ngx_copy(pos, int_buf, end - int_buf);
|
480
|
+
"!~PASSENGER_STARTUP_FILE: ",
|
481
|
+
sizeof("!~PASSENGER_STARTUP_FILE: ") - 1);
|
482
|
+
pos = ngx_copy(pos,
|
483
|
+
conf->autogenerated.startup_file.data,
|
484
|
+
conf->autogenerated.startup_file.len);
|
492
485
|
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
493
486
|
}
|
494
487
|
if (conf->autogenerated.restart_dir.data != NULL) {
|
@@ -500,13 +493,48 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
|
|
500
493
|
conf->autogenerated.restart_dir.len);
|
501
494
|
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
502
495
|
}
|
503
|
-
if (conf->autogenerated.
|
496
|
+
if (conf->autogenerated.abort_websockets_on_process_shutdown != NGX_CONF_UNSET) {
|
504
497
|
pos = ngx_copy(pos,
|
505
|
-
"!~
|
506
|
-
sizeof("!~
|
498
|
+
"!~PASSENGER_ABORT_WEBSOCKETS_ON_PROCESS_SHUTDOWN: ",
|
499
|
+
sizeof("!~PASSENGER_ABORT_WEBSOCKETS_ON_PROCESS_SHUTDOWN: ") - 1);
|
500
|
+
if (conf->autogenerated.abort_websockets_on_process_shutdown) {
|
501
|
+
pos = ngx_copy(pos, "t\r\n", sizeof("t\r\n") - 1);
|
502
|
+
} else {
|
503
|
+
pos = ngx_copy(pos, "f\r\n", sizeof("f\r\n") - 1);
|
504
|
+
}
|
505
|
+
}
|
506
|
+
|
507
|
+
if (conf->autogenerated.force_max_concurrent_requests_per_process != NGX_CONF_UNSET) {
|
507
508
|
pos = ngx_copy(pos,
|
508
|
-
|
509
|
-
|
509
|
+
"!~PASSENGER_FORCE_MAX_CONCURRENT_REQUESTS_PER_PROCESS: ",
|
510
|
+
sizeof("!~PASSENGER_FORCE_MAX_CONCURRENT_REQUESTS_PER_PROCESS: ") - 1);
|
511
|
+
end = ngx_snprintf(int_buf,
|
512
|
+
sizeof(int_buf) - 1,
|
513
|
+
"%d",
|
514
|
+
conf->autogenerated.force_max_concurrent_requests_per_process);
|
515
|
+
pos = ngx_copy(pos, int_buf, end - int_buf);
|
516
|
+
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
517
|
+
}
|
518
|
+
if (conf->autogenerated.max_requests != NGX_CONF_UNSET_UINT) {
|
519
|
+
pos = ngx_copy(pos,
|
520
|
+
"!~PASSENGER_MAX_REQUESTS: ",
|
521
|
+
sizeof("!~PASSENGER_MAX_REQUESTS: ") - 1);
|
522
|
+
end = ngx_snprintf(int_buf,
|
523
|
+
sizeof(int_buf) - 1,
|
524
|
+
"%ui",
|
525
|
+
conf->autogenerated.max_requests);
|
526
|
+
pos = ngx_copy(pos, int_buf, end - int_buf);
|
527
|
+
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
528
|
+
}
|
529
|
+
if (conf->autogenerated.request_queue_overflow_status_code != NGX_CONF_UNSET) {
|
530
|
+
pos = ngx_copy(pos,
|
531
|
+
"!~PASSENGER_REQUEST_QUEUE_OVERFLOW_STATUS_CODE: ",
|
532
|
+
sizeof("!~PASSENGER_REQUEST_QUEUE_OVERFLOW_STATUS_CODE: ") - 1);
|
533
|
+
end = ngx_snprintf(int_buf,
|
534
|
+
sizeof(int_buf) - 1,
|
535
|
+
"%d",
|
536
|
+
conf->autogenerated.request_queue_overflow_status_code);
|
537
|
+
pos = ngx_copy(pos, int_buf, end - int_buf);
|
510
538
|
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
511
539
|
}
|
512
540
|
if (conf->autogenerated.sticky_sessions != NGX_CONF_UNSET) {
|
@@ -538,26 +566,13 @@ passenger_serialize_autogenerated_loc_conf_to_headers(ngx_conf_t *cf, passenger_
|
|
538
566
|
conf->autogenerated.vary_turbocache_by_cookie.len);
|
539
567
|
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
540
568
|
}
|
541
|
-
if (conf->autogenerated.
|
569
|
+
if (conf->autogenerated.app_log_file.data != NULL) {
|
542
570
|
pos = ngx_copy(pos,
|
543
|
-
"!~
|
544
|
-
sizeof("!~
|
545
|
-
if (conf->autogenerated.abort_websockets_on_process_shutdown) {
|
546
|
-
pos = ngx_copy(pos, "t\r\n", sizeof("t\r\n") - 1);
|
547
|
-
} else {
|
548
|
-
pos = ngx_copy(pos, "f\r\n", sizeof("f\r\n") - 1);
|
549
|
-
}
|
550
|
-
}
|
551
|
-
|
552
|
-
if (conf->autogenerated.force_max_concurrent_requests_per_process != NGX_CONF_UNSET) {
|
571
|
+
"!~PASSENGER_APP_LOG_FILE: ",
|
572
|
+
sizeof("!~PASSENGER_APP_LOG_FILE: ") - 1);
|
553
573
|
pos = ngx_copy(pos,
|
554
|
-
|
555
|
-
|
556
|
-
end = ngx_snprintf(int_buf,
|
557
|
-
sizeof(int_buf) - 1,
|
558
|
-
"%d",
|
559
|
-
conf->autogenerated.force_max_concurrent_requests_per_process);
|
560
|
-
pos = ngx_copy(pos, int_buf, end - int_buf);
|
574
|
+
conf->autogenerated.app_log_file.data,
|
575
|
+
conf->autogenerated.app_log_file.len);
|
561
576
|
pos = ngx_copy(pos, (const u_char *) "\r\n", sizeof("\r\n") - 1);
|
562
577
|
}
|
563
578
|
|