passenger 5.3.7 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +14 -0
- data/build/agent.rb +4 -2
- data/build/support/cxx_dependency_map.rb +134 -0
- data/resources/templates/standalone/server.erb +1 -0
- data/src/agent/AgentMain.cpp +4 -0
- data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Options.h +7 -7
- data/src/agent/Core/ApplicationPool/Process.h +3 -0
- data/src/agent/Core/Config.h +9 -2
- data/src/agent/Core/Controller/Config.h +27 -6
- data/src/agent/Core/Controller/InitRequest.cpp +12 -7
- data/src/agent/Core/Controller/InitializationAndShutdown.cpp +2 -0
- data/src/agent/Core/CoreMain.cpp +62 -33
- data/src/agent/Core/OptionParser.h +6 -0
- data/src/agent/Core/SpawningKit/Spawner.h +20 -5
- data/src/agent/Core/SpawningKit/UserSwitchingRules.h +13 -6
- data/src/agent/Core/TelemetryCollector.h +1 -0
- data/src/agent/FileReadHelper/FileReadHelperMain.cpp +198 -0
- data/src/agent/Watchdog/Config.h +1 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +5 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +15 -0
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +5 -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/apache2_module/DirectoryMapper.h +14 -3
- data/src/apache2_module/Hooks.cpp +15 -4
- data/src/cxx_supportlib/AppLocalConfigFileUtils.h +148 -0
- data/src/cxx_supportlib/AppTypeDetector/CBindings.cpp +12 -1
- data/src/cxx_supportlib/AppTypeDetector/CBindings.h +2 -0
- data/src/cxx_supportlib/AppTypeDetector/Detector.h +38 -4
- data/src/cxx_supportlib/Constants.h +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +16 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +6 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +12 -0
- data/src/nginx_module/Configuration.c +20 -0
- data/src/nginx_module/ContentHandler.c +301 -23
- data/src/nginx_module/ContentHandler.h +5 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +10 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +27 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +3 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +7 -0
- data/src/nginx_module/ngx_http_passenger_module.h +6 -1
- data/src/ruby_supportlib/phusion_passenger.rb +6 -5
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +6 -0
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +14 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +11 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +1 -0
- metadata +4 -2
@@ -40,6 +40,11 @@ typedef struct {
|
|
40
40
|
u_char *status_start;
|
41
41
|
u_char *status_end;
|
42
42
|
|
43
|
+
/* body_rechunk_output_filter state. */
|
44
|
+
ngx_chain_t *free;
|
45
|
+
ngx_chain_t *busy;
|
46
|
+
unsigned header_sent: 1;
|
47
|
+
|
43
48
|
/** The application's 'public' directory. */
|
44
49
|
ngx_str_t public_dir;
|
45
50
|
|
@@ -75,6 +75,8 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
|
|
75
75
|
conf->app_type.len = 0;
|
76
76
|
conf->startup_file.data = NULL;
|
77
77
|
conf->startup_file.len = 0;
|
78
|
+
conf->app_start_command.data = NULL;
|
79
|
+
conf->app_start_command.len = 0;
|
78
80
|
conf->restart_dir.data = NULL;
|
79
81
|
conf->restart_dir.len = 0;
|
80
82
|
conf->abort_websockets_on_process_shutdown = NGX_CONF_UNSET;
|
@@ -183,6 +185,10 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
|
|
183
185
|
conf->startup_file_source_file.len = 0;
|
184
186
|
conf->startup_file_source_line = 0;
|
185
187
|
conf->startup_file_explicitly_set = 0;
|
188
|
+
conf->app_start_command_source_file.data = NULL;
|
189
|
+
conf->app_start_command_source_file.len = 0;
|
190
|
+
conf->app_start_command_source_line = 0;
|
191
|
+
conf->app_start_command_explicitly_set = 0;
|
186
192
|
conf->restart_dir_source_file.data = NULL;
|
187
193
|
conf->restart_dir_source_file.len = 0;
|
188
194
|
conf->restart_dir_source_line = 0;
|
@@ -255,6 +261,10 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
|
|
255
261
|
conf->upstream_config_busy_buffers_size_conf_source_file.len = 0;
|
256
262
|
conf->upstream_config_busy_buffers_size_conf_source_line = 0;
|
257
263
|
conf->upstream_config_busy_buffers_size_conf_explicitly_set = 0;
|
264
|
+
conf->upstream_config_request_buffering_source_file.data = NULL;
|
265
|
+
conf->upstream_config_request_buffering_source_file.len = 0;
|
266
|
+
conf->upstream_config_request_buffering_source_line = 0;
|
267
|
+
conf->upstream_config_request_buffering_explicitly_set = 0;
|
258
268
|
conf->upstream_config_intercept_errors_source_file.data = NULL;
|
259
269
|
conf->upstream_config_intercept_errors_source_file.len = 0;
|
260
270
|
conf->upstream_config_intercept_errors_source_line = 0;
|
@@ -345,6 +345,20 @@ generate_config_manifest_for_autogenerated_loc_conf(manifest_gen_ctx_t *ctx, pas
|
|
345
345
|
(const char *) plcf->autogenerated.startup_file.data,
|
346
346
|
plcf->autogenerated.startup_file.len);
|
347
347
|
}
|
348
|
+
if (plcf->autogenerated.app_start_command_explicitly_set) {
|
349
|
+
find_or_create_manifest_app_and_loc_options_containers(ctx,
|
350
|
+
plcf, cscf, clcf, &app_options_container, &loc_options_container);
|
351
|
+
option_container = find_or_create_manifest_option_container(ctx,
|
352
|
+
app_options_container,
|
353
|
+
"passenger_app_start_command",
|
354
|
+
sizeof("passenger_app_start_command") - 1);
|
355
|
+
hierarchy_member = add_manifest_option_container_hierarchy_member(option_container,
|
356
|
+
&plcf->autogenerated.app_start_command_source_file,
|
357
|
+
plcf->autogenerated.app_start_command_source_line);
|
358
|
+
psg_json_value_set_str(hierarchy_member, "value",
|
359
|
+
(const char *) plcf->autogenerated.app_start_command.data,
|
360
|
+
plcf->autogenerated.app_start_command.len);
|
361
|
+
}
|
348
362
|
if (plcf->autogenerated.restart_dir_explicitly_set) {
|
349
363
|
find_or_create_manifest_app_and_loc_options_containers(ctx,
|
350
364
|
plcf, cscf, clcf, &app_options_container, &loc_options_container);
|
@@ -529,6 +543,19 @@ generate_config_manifest_for_autogenerated_loc_conf(manifest_gen_ctx_t *ctx, pas
|
|
529
543
|
psg_json_value_set_bool(hierarchy_member, "value",
|
530
544
|
plcf->upstream_config.buffering);
|
531
545
|
}
|
546
|
+
if (plcf->autogenerated.upstream_config_request_buffering_explicitly_set) {
|
547
|
+
find_or_create_manifest_app_and_loc_options_containers(ctx,
|
548
|
+
plcf, cscf, clcf, &app_options_container, &loc_options_container);
|
549
|
+
option_container = find_or_create_manifest_option_container(ctx,
|
550
|
+
loc_options_container,
|
551
|
+
"passenger_request_buffering",
|
552
|
+
sizeof("passenger_request_buffering") - 1);
|
553
|
+
hierarchy_member = add_manifest_option_container_hierarchy_member(option_container,
|
554
|
+
&plcf->autogenerated.upstream_config_request_buffering_source_file,
|
555
|
+
plcf->autogenerated.upstream_config_request_buffering_source_line);
|
556
|
+
psg_json_value_set_bool(hierarchy_member, "value",
|
557
|
+
plcf->upstream_config.request_buffering);
|
558
|
+
}
|
532
559
|
if (plcf->autogenerated.upstream_config_intercept_errors_explicitly_set) {
|
533
560
|
find_or_create_manifest_app_and_loc_options_containers(ctx,
|
534
561
|
plcf, cscf, clcf, &app_options_container, &loc_options_container);
|
@@ -113,6 +113,9 @@ passenger_merge_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *conf,
|
|
113
113
|
ngx_conf_merge_str_value(conf->startup_file,
|
114
114
|
prev->startup_file,
|
115
115
|
NULL);
|
116
|
+
ngx_conf_merge_str_value(conf->app_start_command,
|
117
|
+
prev->app_start_command,
|
118
|
+
NULL);
|
116
119
|
ngx_conf_merge_str_value(conf->restart_dir,
|
117
120
|
prev->restart_dir,
|
118
121
|
"tmp");
|
@@ -62,6 +62,7 @@ typedef struct {
|
|
62
62
|
ngx_str_t app_log_file;
|
63
63
|
ngx_str_t app_rights;
|
64
64
|
ngx_str_t app_root;
|
65
|
+
ngx_str_t app_start_command;
|
65
66
|
ngx_str_t app_type;
|
66
67
|
ngx_str_t document_root;
|
67
68
|
ngx_str_t environment;
|
@@ -82,6 +83,7 @@ typedef struct {
|
|
82
83
|
ngx_str_t app_log_file_source_file;
|
83
84
|
ngx_str_t app_rights_source_file;
|
84
85
|
ngx_str_t app_root_source_file;
|
86
|
+
ngx_str_t app_start_command_source_file;
|
85
87
|
ngx_str_t app_type_source_file;
|
86
88
|
ngx_str_t base_uris_source_file;
|
87
89
|
ngx_str_t debugger_source_file;
|
@@ -121,6 +123,7 @@ typedef struct {
|
|
121
123
|
ngx_str_t upstream_config_intercept_errors_source_file;
|
122
124
|
ngx_str_t upstream_config_pass_headers_source_file;
|
123
125
|
ngx_str_t upstream_config_read_timeout_source_file;
|
126
|
+
ngx_str_t upstream_config_request_buffering_source_file;
|
124
127
|
ngx_str_t user_source_file;
|
125
128
|
ngx_str_t vary_turbocache_by_cookie_source_file;
|
126
129
|
|
@@ -129,6 +132,7 @@ typedef struct {
|
|
129
132
|
ngx_uint_t app_log_file_source_line;
|
130
133
|
ngx_uint_t app_rights_source_line;
|
131
134
|
ngx_uint_t app_root_source_line;
|
135
|
+
ngx_uint_t app_start_command_source_line;
|
132
136
|
ngx_uint_t app_type_source_line;
|
133
137
|
ngx_uint_t base_uris_source_line;
|
134
138
|
ngx_uint_t debugger_source_line;
|
@@ -168,6 +172,7 @@ typedef struct {
|
|
168
172
|
ngx_uint_t upstream_config_intercept_errors_source_line;
|
169
173
|
ngx_uint_t upstream_config_pass_headers_source_line;
|
170
174
|
ngx_uint_t upstream_config_read_timeout_source_line;
|
175
|
+
ngx_uint_t upstream_config_request_buffering_source_line;
|
171
176
|
ngx_uint_t user_source_line;
|
172
177
|
ngx_uint_t vary_turbocache_by_cookie_source_line;
|
173
178
|
|
@@ -176,6 +181,7 @@ typedef struct {
|
|
176
181
|
ngx_int_t app_log_file_explicitly_set;
|
177
182
|
ngx_int_t app_rights_explicitly_set;
|
178
183
|
ngx_int_t app_root_explicitly_set;
|
184
|
+
ngx_int_t app_start_command_explicitly_set;
|
179
185
|
ngx_int_t app_type_explicitly_set;
|
180
186
|
ngx_int_t base_uris_explicitly_set;
|
181
187
|
ngx_int_t debugger_explicitly_set;
|
@@ -215,6 +221,7 @@ typedef struct {
|
|
215
221
|
ngx_int_t upstream_config_intercept_errors_explicitly_set;
|
216
222
|
ngx_int_t upstream_config_pass_headers_explicitly_set;
|
217
223
|
ngx_int_t upstream_config_read_timeout_explicitly_set;
|
224
|
+
ngx_int_t upstream_config_request_buffering_explicitly_set;
|
218
225
|
ngx_int_t user_explicitly_set;
|
219
226
|
ngx_int_t vary_turbocache_by_cookie_explicitly_set;
|
220
227
|
} passenger_autogenerated_loc_conf_t;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* Copyright (C) Igor Sysoev
|
3
3
|
* Copyright (C) 2007 Manlio Perillo (manlio.perillo@gmail.com)
|
4
|
-
* Copyright (c) 2010-
|
4
|
+
* Copyright (c) 2010-2018 Phusion Holding B.V.
|
5
5
|
*
|
6
6
|
* Redistribution and use in source and binary forms, with or without
|
7
7
|
* modification, are permitted provided that the following conditions
|
@@ -43,6 +43,11 @@
|
|
43
43
|
1000 * PASSENGER_NGINX_MINOR_VERSION + \
|
44
44
|
PASSENGER_NGINX_MICRO_VERSION)
|
45
45
|
|
46
|
+
/* https://trac.nginx.org/nginx/ticket/1618 */
|
47
|
+
#if NGINX_VERSION_NUM >= 1015003
|
48
|
+
#define NGINX_NO_SEND_REQUEST_BODY_INFINITE_LOOP_BUG
|
49
|
+
#endif
|
50
|
+
|
46
51
|
extern ngx_module_t ngx_http_passenger_module;
|
47
52
|
|
48
53
|
/**
|
@@ -31,15 +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 = '
|
34
|
+
VERSION_STRING = '6.0.0'
|
35
35
|
|
36
|
-
|
37
|
-
|
36
|
+
# Tip: find the SHA-256 with ./dev/nginx_version_sha2 <VERSION>
|
37
|
+
PREFERRED_NGINX_VERSION = '1.15.7'
|
38
|
+
NGINX_SHA256_CHECKSUM = '8f22ea2f6c0e0a221b6ddc02b6428a3ff708e2ad55f9361102b1c9f4142bdf93'
|
38
39
|
|
39
40
|
# Packaging may be locked to an older version due to the specific module configuration being
|
40
41
|
# incompatible with the version we prefer (latest stable).
|
41
|
-
PACKAGING_PREFERRED_NGINX_VERSION = '1.
|
42
|
-
PACKAGING_NGINX_SHA256_CHECKSUM = '
|
42
|
+
PACKAGING_PREFERRED_NGINX_VERSION = '1.15.7'
|
43
|
+
PACKAGING_NGINX_SHA256_CHECKSUM = '8f22ea2f6c0e0a221b6ddc02b6428a3ff708e2ad55f9361102b1c9f4142bdf93'
|
43
44
|
|
44
45
|
# sha256sum of the .tar.gz
|
45
46
|
PREFERRED_PCRE_VERSION = '8.42'
|
@@ -354,6 +354,12 @@ APACHE2_CONFIGURATION_OPTIONS = [
|
|
354
354
|
:desc => 'Force specific application type.',
|
355
355
|
:header => nil
|
356
356
|
},
|
357
|
+
{
|
358
|
+
:name => 'PassengerAppStartCommand',
|
359
|
+
:type => :string,
|
360
|
+
:desc => 'Command string for starting the application.',
|
361
|
+
:header => nil
|
362
|
+
},
|
357
363
|
{
|
358
364
|
:name => 'PassengerStartupFile',
|
359
365
|
:type => :string,
|
@@ -485,6 +485,12 @@ NGINX_CONFIGURATION_OPTIONS = [
|
|
485
485
|
:type => :string,
|
486
486
|
:dynamic_default => 'Autodetected'
|
487
487
|
},
|
488
|
+
{
|
489
|
+
:name => 'passenger_app_start_command',
|
490
|
+
:scope => :application,
|
491
|
+
:type => :string,
|
492
|
+
:header => nil
|
493
|
+
},
|
488
494
|
{
|
489
495
|
:name => 'passenger_restart_dir',
|
490
496
|
:scope => :application,
|
@@ -619,6 +625,14 @@ NGINX_CONFIGURATION_OPTIONS = [
|
|
619
625
|
:field => 'upstream_config.busy_buffers_size_conf',
|
620
626
|
:auto_generate_nginx_tracking_code => false
|
621
627
|
},
|
628
|
+
{
|
629
|
+
:name => 'passenger_request_buffering',
|
630
|
+
:scope => :location,
|
631
|
+
:type => :flag,
|
632
|
+
:default => true,
|
633
|
+
:field => 'upstream_config.request_buffering',
|
634
|
+
:function => 'passenger_conf_set_request_buffering'
|
635
|
+
},
|
622
636
|
{
|
623
637
|
:name => 'passenger_intercept_errors',
|
624
638
|
:scope => :location,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Phusion Passenger - https://www.phusionpassenger.com/
|
2
|
-
# Copyright (c) 2015-
|
2
|
+
# Copyright (c) 2015-2018 Phusion Holding B.V.
|
3
3
|
#
|
4
4
|
# "Passenger", "Phusion Passenger" and "Union Station" are registered
|
5
5
|
# trademarks of Phusion Holding B.V.
|
@@ -242,6 +242,16 @@ module PhusionPassenger
|
|
242
242
|
:type_desc => 'FILENAME',
|
243
243
|
:desc => 'Force given startup file to be used'
|
244
244
|
},
|
245
|
+
{
|
246
|
+
:name => :app_start_command,
|
247
|
+
:type_desc => 'COMMAND',
|
248
|
+
:desc => 'Force the app to be started through this command'
|
249
|
+
},
|
250
|
+
{
|
251
|
+
:name => :app_support_kuria_protocol,
|
252
|
+
:type => :boolean,
|
253
|
+
:desc => 'Force the app to be recognized as a Kuria app',
|
254
|
+
},
|
245
255
|
{
|
246
256
|
:name => :spawn_method,
|
247
257
|
:type_desc => 'NAME',
|
@@ -139,6 +139,7 @@ module PhusionPassenger
|
|
139
139
|
add_param(command, :environment, "--environment")
|
140
140
|
add_param(command, :app_type, "--app-type")
|
141
141
|
add_param(command, :startup_file, "--startup-file")
|
142
|
+
add_param(command, :app_start_command, "--app-start-command")
|
142
143
|
add_param(command, :spawn_method, "--spawn-method")
|
143
144
|
add_param(command, :restart_dir, "--restart-dir")
|
144
145
|
if @options.has_key?(:friendly_error_pages)
|
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:
|
4
|
+
version: 6.0.0
|
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: 2018-11-
|
11
|
+
date: 2018-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -301,6 +301,7 @@ files:
|
|
301
301
|
- src/agent/Core/SpawningKit/UserSwitchingRules.h
|
302
302
|
- src/agent/Core/TelemetryCollector.h
|
303
303
|
- src/agent/ExecHelper/ExecHelperMain.cpp
|
304
|
+
- src/agent/FileReadHelper/FileReadHelperMain.cpp
|
304
305
|
- src/agent/README.md
|
305
306
|
- src/agent/Shared/ApiAccountUtils.h
|
306
307
|
- src/agent/Shared/ApiServerUtils.h
|
@@ -358,6 +359,7 @@ files:
|
|
358
359
|
- src/cxx_supportlib/Algorithms/Hasher.cpp
|
359
360
|
- src/cxx_supportlib/Algorithms/Hasher.h
|
360
361
|
- src/cxx_supportlib/Algorithms/MovingAverage.h
|
362
|
+
- src/cxx_supportlib/AppLocalConfigFileUtils.h
|
361
363
|
- src/cxx_supportlib/AppTypeDetector/CBindings.cpp
|
362
364
|
- src/cxx_supportlib/AppTypeDetector/CBindings.h
|
363
365
|
- src/cxx_supportlib/AppTypeDetector/Detector.h
|