passenger 6.0.6 → 6.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +28 -1
  3. data/CONTRIBUTING.md +1 -1
  4. data/CONTRIBUTORS +2 -0
  5. data/bin/passenger-memory-stats +65 -12
  6. data/passenger.gemspec +1 -1
  7. data/resources/templates/error_renderer/with_details/dist/bundle.js +1 -1
  8. data/resources/templates/error_renderer/with_details/src/GetHelpView.jsx +1 -1
  9. data/resources/templates/standalone/rails_asset_pipeline.erb +1 -1
  10. data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +1 -0
  11. data/src/agent/Core/ApplicationPool/Implementation.cpp +0 -1
  12. data/src/agent/Core/ApplicationPool/Options.h +9 -0
  13. data/src/agent/Core/Config.h +2 -1
  14. data/src/agent/Core/Controller/Config.h +5 -1
  15. data/src/agent/Core/Controller/InitRequest.cpp +2 -0
  16. data/src/agent/Core/SpawningKit/Config.h +11 -0
  17. data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +13 -0
  18. data/src/agent/Core/SpawningKit/Spawner.h +1 -0
  19. data/src/agent/Watchdog/Config.h +2 -1
  20. data/src/apache2_module/Config.cpp +1 -1
  21. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +10 -0
  22. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +10 -0
  23. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +25 -0
  24. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +10 -0
  25. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +6 -0
  26. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +26 -0
  27. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +14 -0
  28. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +34 -0
  29. data/src/cxx_supportlib/Constants.h +3 -2
  30. data/src/cxx_supportlib/Hooks.h +1 -0
  31. data/src/cxx_supportlib/vendor-modified/modp_b64_data.h +0 -4
  32. data/src/cxx_supportlib/vendor-modified/modp_b64_strict_aliasing.cpp +5 -1
  33. data/src/helper-scripts/node-loader.js +1 -1
  34. data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +8 -0
  35. data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +7 -0
  36. data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +12 -0
  37. data/src/nginx_module/Configuration.c +1 -1
  38. data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +6 -0
  39. data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +15 -0
  40. data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +14 -0
  41. data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +3 -0
  42. data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +4 -0
  43. data/src/nginx_module/ngx_http_passenger_module.c +2 -2
  44. data/src/ruby_supportlib/phusion_passenger.rb +2 -2
  45. data/src/ruby_supportlib/phusion_passenger/admin_tools/memory_stats.rb +1 -1
  46. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +6 -0
  47. data/src/ruby_supportlib/phusion_passenger/constants.rb +2 -1
  48. data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +5 -1
  49. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +6 -0
  50. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +1 -1
  51. data/src/ruby_supportlib/phusion_passenger/request_handler.rb +7 -6
  52. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +7 -0
  53. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +2 -2
  54. metadata +3 -3
@@ -172,6 +172,11 @@ extern "C" const command_rec passenger_commands[] = {
172
172
  NULL,
173
173
  RSRC_CONF,
174
174
  "The user that Phusion Passenger applications must run as when user switching fails or is disabled."),
175
+ AP_INIT_TAKE1("PassengerDirectInstanceRequestAddress",
176
+ (Take1Func) cmd_passenger_direct_instance_request_address,
177
+ NULL,
178
+ RSRC_CONF | ACCESS_CONF,
179
+ "The address that Passenger binds to in order to allow sending HTTP requests to individual application processes."),
175
180
  AP_INIT_FLAG("PassengerDisableAnonymousTelemetry",
176
181
  (FlagFunc) cmd_passenger_disable_anonymous_telemetry,
177
182
  NULL,
@@ -412,6 +417,11 @@ extern "C" const command_rec passenger_commands[] = {
412
417
  NULL,
413
418
  RSRC_CONF | ACCESS_CONF | OR_ALL,
414
419
  "Whether to enable sticky sessions."),
420
+ AP_INIT_TAKE1("PassengerStickySessionsCookieAttributes",
421
+ (Take1Func) cmd_passenger_sticky_sessions_cookie_attributes,
422
+ NULL,
423
+ RSRC_CONF | ACCESS_CONF | OR_ALL,
424
+ "The attributes to use for the sticky session cookie."),
415
425
  AP_INIT_TAKE1("PassengerStickySessionsCookieName",
416
426
  (Take1Func) cmd_passenger_sticky_sessions_cookie_name,
417
427
  NULL,
@@ -179,6 +179,11 @@ ConfigManifestGenerator::autoGenerated_setAppConfigDefaults() {
179
179
  "PassengerAppType",
180
180
  P_STATIC_STRING("Autodetected"));
181
181
 
182
+ addOptionsContainerStaticDefaultStr(
183
+ defaultAppConfigContainer,
184
+ "PassengerDirectInstanceRequestAddress",
185
+ P_STATIC_STRING("127.0.0.1"));
186
+
182
187
  addOptionsContainerStaticDefaultInt(
183
188
  defaultAppConfigContainer,
184
189
  "PassengerForceMaxConcurrentRequestsPerProcess",
@@ -305,6 +310,11 @@ ConfigManifestGenerator::autoGenerated_setLocationConfigDefaults() {
305
310
  "PassengerStickySessions",
306
311
  false);
307
312
 
313
+ addOptionsContainerStaticDefaultStr(
314
+ defaultLocConfigContainer,
315
+ "PassengerStickySessionsCookieAttributes",
316
+ DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES);
317
+
308
318
  addOptionsContainerStaticDefaultStr(
309
319
  defaultLocConfigContainer,
310
320
  "PassengerStickySessionsCookieName",
@@ -319,6 +319,21 @@ cmd_passenger_default_user(cmd_parms *cmd, void *pcfg, const char *arg) {
319
319
  return NULL;
320
320
  }
321
321
 
322
+ static const char *
323
+ cmd_passenger_direct_instance_request_address(cmd_parms *cmd, void *pcfg, const char *arg) {
324
+ const char *err = ap_check_cmd_context(cmd, NOT_IN_FILES);
325
+ if (err != NULL) {
326
+ return err;
327
+ }
328
+
329
+ DirConfig *config = (DirConfig *) pcfg;
330
+ config->mDirectInstanceRequestAddressSourceFile = cmd->directive->filename;
331
+ config->mDirectInstanceRequestAddressSourceLine = cmd->directive->line_num;
332
+ config->mDirectInstanceRequestAddressExplicitlySet = true;
333
+ config->mDirectInstanceRequestAddress = arg;
334
+ return NULL;
335
+ }
336
+
322
337
  static const char *
323
338
  cmd_passenger_disable_anonymous_telemetry(cmd_parms *cmd, void *pcfg, const char *arg) {
324
339
  const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
@@ -903,6 +918,16 @@ cmd_passenger_sticky_sessions(cmd_parms *cmd, void *pcfg, const char *arg) {
903
918
  return NULL;
904
919
  }
905
920
 
921
+ static const char *
922
+ cmd_passenger_sticky_sessions_cookie_attributes(cmd_parms *cmd, void *pcfg, const char *arg) {
923
+ DirConfig *config = (DirConfig *) pcfg;
924
+ config->mStickySessionsCookieAttributesSourceFile = cmd->directive->filename;
925
+ config->mStickySessionsCookieAttributesSourceLine = cmd->directive->line_num;
926
+ config->mStickySessionsCookieAttributesExplicitlySet = true;
927
+ config->mStickySessionsCookieAttributes = arg;
928
+ return NULL;
929
+ }
930
+
906
931
  static const char *
907
932
  cmd_passenger_sticky_sessions_cookie_name(cmd_parms *cmd, void *pcfg, const char *arg) {
908
933
  DirConfig *config = (DirConfig *) pcfg;
@@ -75,6 +75,9 @@ createDirConfig_autoGenerated(DirConfig *config) {
75
75
  */
76
76
  config->mBufferResponse = Apache2Module::UNSET;
77
77
  config->mBufferUpload = Apache2Module::UNSET;
78
+ /*
79
+ * config->mDirectInstanceRequestAddress: default initialized
80
+ */
78
81
  config->mEnabled = Apache2Module::UNSET;
79
82
  config->mErrorOverride = Apache2Module::UNSET;
80
83
  config->mForceMaxConcurrentRequestsPerProcess = UNSET_INT_VALUE;
@@ -115,6 +118,9 @@ createDirConfig_autoGenerated(DirConfig *config) {
115
118
  * config->mStartupFile: default initialized
116
119
  */
117
120
  config->mStickySessions = Apache2Module::UNSET;
121
+ /*
122
+ * config->mStickySessionsCookieAttributes: default initialized
123
+ */
118
124
  /*
119
125
  * config->mStickySessionsCookieName: default initialized
120
126
  */
@@ -132,6 +138,7 @@ createDirConfig_autoGenerated(DirConfig *config) {
132
138
  config->mBaseURIsSourceLine = 0;
133
139
  config->mBufferResponseSourceLine = 0;
134
140
  config->mBufferUploadSourceLine = 0;
141
+ config->mDirectInstanceRequestAddressSourceLine = 0;
135
142
  config->mEnabledSourceLine = 0;
136
143
  config->mErrorOverrideSourceLine = 0;
137
144
  config->mForceMaxConcurrentRequestsPerProcessSourceLine = 0;
@@ -154,6 +161,7 @@ createDirConfig_autoGenerated(DirConfig *config) {
154
161
  config->mStartTimeoutSourceLine = 0;
155
162
  config->mStartupFileSourceLine = 0;
156
163
  config->mStickySessionsSourceLine = 0;
164
+ config->mStickySessionsCookieAttributesSourceLine = 0;
157
165
  config->mStickySessionsCookieNameSourceLine = 0;
158
166
  config->mUserSourceLine = 0;
159
167
 
@@ -167,6 +175,7 @@ createDirConfig_autoGenerated(DirConfig *config) {
167
175
  config->mBaseURIsExplicitlySet = false;
168
176
  config->mBufferResponseExplicitlySet = false;
169
177
  config->mBufferUploadExplicitlySet = false;
178
+ config->mDirectInstanceRequestAddressExplicitlySet = false;
170
179
  config->mEnabledExplicitlySet = false;
171
180
  config->mErrorOverrideExplicitlySet = false;
172
181
  config->mForceMaxConcurrentRequestsPerProcessExplicitlySet = false;
@@ -189,6 +198,7 @@ createDirConfig_autoGenerated(DirConfig *config) {
189
198
  config->mStartTimeoutExplicitlySet = false;
190
199
  config->mStartupFileExplicitlySet = false;
191
200
  config->mStickySessionsExplicitlySet = false;
201
+ config->mStickySessionsCookieAttributesExplicitlySet = false;
192
202
  config->mStickySessionsCookieNameExplicitlySet = false;
193
203
  config->mUserExplicitlySet = false;
194
204
  }
@@ -61,6 +61,9 @@ constructRequestHeaders_autoGenerated(request_rec *r, DirConfig *config, std::st
61
61
  addHeader(result, StaticString("!~PASSENGER_APP_LOG_FILE",
62
62
  sizeof("!~PASSENGER_APP_LOG_FILE") - 1),
63
63
  config->mAppLogFile);
64
+ addHeader(result, StaticString("!~PASSENGER_DIRECT_INSTANCE_REQUEST_ADDRESS",
65
+ sizeof("!~PASSENGER_DIRECT_INSTANCE_REQUEST_ADDRESS") - 1),
66
+ config->mDirectInstanceRequestAddress);
64
67
  addHeader(r, result, StaticString("!~PASSENGER_FORCE_MAX_CONCURRENT_REQUESTS_PER_PROCESS",
65
68
  sizeof("!~PASSENGER_FORCE_MAX_CONCURRENT_REQUESTS_PER_PROCESS") - 1),
66
69
  config->mForceMaxConcurrentRequestsPerProcess);
@@ -115,6 +118,9 @@ constructRequestHeaders_autoGenerated(request_rec *r, DirConfig *config, std::st
115
118
  addHeader(result, StaticString("!~PASSENGER_STICKY_SESSIONS",
116
119
  sizeof("!~PASSENGER_STICKY_SESSIONS") - 1),
117
120
  config->mStickySessions);
121
+ addHeader(result, StaticString("!~PASSENGER_STICKY_SESSIONS_COOKIE_ATTRIBUTES",
122
+ sizeof("!~PASSENGER_STICKY_SESSIONS_COOKIE_ATTRIBUTES") - 1),
123
+ config->mStickySessionsCookieAttributes);
118
124
  addHeader(result, StaticString("!~PASSENGER_STICKY_SESSIONS_COOKIE_NAME",
119
125
  sizeof("!~PASSENGER_STICKY_SESSIONS_COOKIE_NAME") - 1),
120
126
  config->mStickySessionsCookieName);
@@ -176,6 +176,19 @@ ConfigManifestGenerator::autoGenerated_generateConfigManifestForDirConfig(server
176
176
  pdconf->mBufferUploadSourceLine);
177
177
  hierarchyMember["value"] = pdconf->mBufferUpload == Apache2Module::ENABLED;
178
178
  }
179
+ if (pdconf->mDirectInstanceRequestAddressExplicitlySet) {
180
+ findOrCreateAppAndLocOptionsContainers(serverRec, csconf, cdconf,
181
+ pdconf, context, &appOptionsContainer, &locOptionsContainer);
182
+ Json::Value &optionContainer = findOrCreateOptionContainer(*appOptionsContainer,
183
+ "PassengerDirectInstanceRequestAddress",
184
+ sizeof("PassengerDirectInstanceRequestAddress") - 1);
185
+ Json::Value &hierarchyMember = addOptionContainerHierarchyMember(optionContainer,
186
+ pdconf->mDirectInstanceRequestAddressSourceFile,
187
+ pdconf->mDirectInstanceRequestAddressSourceLine);
188
+ hierarchyMember["value"] = Json::Value(
189
+ pdconf->mDirectInstanceRequestAddress.data(),
190
+ pdconf->mDirectInstanceRequestAddress.data() + pdconf->mDirectInstanceRequestAddress.size());
191
+ }
179
192
  if (pdconf->mEnabledExplicitlySet) {
180
193
  findOrCreateAppAndLocOptionsContainers(serverRec, csconf, cdconf,
181
194
  pdconf, context, &appOptionsContainer, &locOptionsContainer);
@@ -435,6 +448,19 @@ ConfigManifestGenerator::autoGenerated_generateConfigManifestForDirConfig(server
435
448
  pdconf->mStickySessionsSourceLine);
436
449
  hierarchyMember["value"] = pdconf->mStickySessions == Apache2Module::ENABLED;
437
450
  }
451
+ if (pdconf->mStickySessionsCookieAttributesExplicitlySet) {
452
+ findOrCreateAppAndLocOptionsContainers(serverRec, csconf, cdconf,
453
+ pdconf, context, &appOptionsContainer, &locOptionsContainer);
454
+ Json::Value &optionContainer = findOrCreateOptionContainer(*locOptionsContainer,
455
+ "PassengerStickySessionsCookieAttributes",
456
+ sizeof("PassengerStickySessionsCookieAttributes") - 1);
457
+ Json::Value &hierarchyMember = addOptionContainerHierarchyMember(optionContainer,
458
+ pdconf->mStickySessionsCookieAttributesSourceFile,
459
+ pdconf->mStickySessionsCookieAttributesSourceLine);
460
+ hierarchyMember["value"] = Json::Value(
461
+ pdconf->mStickySessionsCookieAttributes.data(),
462
+ pdconf->mStickySessionsCookieAttributes.data() + pdconf->mStickySessionsCookieAttributes.size());
463
+ }
438
464
  if (pdconf->mStickySessionsCookieNameExplicitlySet) {
439
465
  findOrCreateAppAndLocOptionsContainers(serverRec, csconf, cdconf,
440
466
  pdconf, context, &appOptionsContainer, &locOptionsContainer);
@@ -88,6 +88,10 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
88
88
  (add->mBufferUpload != Apache2Module::UNSET)
89
89
  ? add->mBufferUpload
90
90
  : base->mBufferUpload;
91
+ config->mDirectInstanceRequestAddress =
92
+ (!add->mDirectInstanceRequestAddress.empty())
93
+ ? add->mDirectInstanceRequestAddress
94
+ : base->mDirectInstanceRequestAddress;
91
95
  config->mEnabled =
92
96
  (add->mEnabled != Apache2Module::UNSET)
93
97
  ? add->mEnabled
@@ -176,6 +180,10 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
176
180
  (add->mStickySessions != Apache2Module::UNSET)
177
181
  ? add->mStickySessions
178
182
  : base->mStickySessions;
183
+ config->mStickySessionsCookieAttributes =
184
+ (!add->mStickySessionsCookieAttributes.empty())
185
+ ? add->mStickySessionsCookieAttributes
186
+ : base->mStickySessionsCookieAttributes;
179
187
  config->mStickySessionsCookieName =
180
188
  (!add->mStickySessionsCookieName.empty())
181
189
  ? add->mStickySessionsCookieName
@@ -195,6 +203,7 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
195
203
  config->mBaseURIsSourceFile = add->mBaseURIsSourceFile;
196
204
  config->mBufferResponseSourceFile = add->mBufferResponseSourceFile;
197
205
  config->mBufferUploadSourceFile = add->mBufferUploadSourceFile;
206
+ config->mDirectInstanceRequestAddressSourceFile = add->mDirectInstanceRequestAddressSourceFile;
198
207
  config->mEnabledSourceFile = add->mEnabledSourceFile;
199
208
  config->mErrorOverrideSourceFile = add->mErrorOverrideSourceFile;
200
209
  config->mForceMaxConcurrentRequestsPerProcessSourceFile = add->mForceMaxConcurrentRequestsPerProcessSourceFile;
@@ -217,6 +226,7 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
217
226
  config->mStartTimeoutSourceFile = add->mStartTimeoutSourceFile;
218
227
  config->mStartupFileSourceFile = add->mStartupFileSourceFile;
219
228
  config->mStickySessionsSourceFile = add->mStickySessionsSourceFile;
229
+ config->mStickySessionsCookieAttributesSourceFile = add->mStickySessionsCookieAttributesSourceFile;
220
230
  config->mStickySessionsCookieNameSourceFile = add->mStickySessionsCookieNameSourceFile;
221
231
  config->mUserSourceFile = add->mUserSourceFile;
222
232
 
@@ -230,6 +240,7 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
230
240
  config->mBaseURIsSourceLine = add->mBaseURIsSourceLine;
231
241
  config->mBufferResponseSourceLine = add->mBufferResponseSourceLine;
232
242
  config->mBufferUploadSourceLine = add->mBufferUploadSourceLine;
243
+ config->mDirectInstanceRequestAddressSourceLine = add->mDirectInstanceRequestAddressSourceLine;
233
244
  config->mEnabledSourceLine = add->mEnabledSourceLine;
234
245
  config->mErrorOverrideSourceLine = add->mErrorOverrideSourceLine;
235
246
  config->mForceMaxConcurrentRequestsPerProcessSourceLine = add->mForceMaxConcurrentRequestsPerProcessSourceLine;
@@ -252,6 +263,7 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
252
263
  config->mStartTimeoutSourceLine = add->mStartTimeoutSourceLine;
253
264
  config->mStartupFileSourceLine = add->mStartupFileSourceLine;
254
265
  config->mStickySessionsSourceLine = add->mStickySessionsSourceLine;
266
+ config->mStickySessionsCookieAttributesSourceLine = add->mStickySessionsCookieAttributesSourceLine;
255
267
  config->mStickySessionsCookieNameSourceLine = add->mStickySessionsCookieNameSourceLine;
256
268
  config->mUserSourceLine = add->mUserSourceLine;
257
269
 
@@ -265,6 +277,7 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
265
277
  config->mBaseURIsExplicitlySet = add->mBaseURIsExplicitlySet;
266
278
  config->mBufferResponseExplicitlySet = add->mBufferResponseExplicitlySet;
267
279
  config->mBufferUploadExplicitlySet = add->mBufferUploadExplicitlySet;
280
+ config->mDirectInstanceRequestAddressExplicitlySet = add->mDirectInstanceRequestAddressExplicitlySet;
268
281
  config->mEnabledExplicitlySet = add->mEnabledExplicitlySet;
269
282
  config->mErrorOverrideExplicitlySet = add->mErrorOverrideExplicitlySet;
270
283
  config->mForceMaxConcurrentRequestsPerProcessExplicitlySet = add->mForceMaxConcurrentRequestsPerProcessExplicitlySet;
@@ -287,6 +300,7 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
287
300
  config->mStartTimeoutExplicitlySet = add->mStartTimeoutExplicitlySet;
288
301
  config->mStartupFileExplicitlySet = add->mStartupFileExplicitlySet;
289
302
  config->mStickySessionsExplicitlySet = add->mStickySessionsExplicitlySet;
303
+ config->mStickySessionsCookieAttributesExplicitlySet = add->mStickySessionsCookieAttributesExplicitlySet;
290
304
  config->mStickySessionsCookieNameExplicitlySet = add->mStickySessionsCookieNameExplicitlySet;
291
305
  config->mUserExplicitlySet = add->mUserExplicitlySet;
292
306
  }
@@ -166,6 +166,11 @@ struct AutoGeneratedDirConfig {
166
166
  */
167
167
  StaticString mAppType;
168
168
 
169
+ /*
170
+ * The address that Passenger binds to in order to allow sending HTTP requests to individual application processes.
171
+ */
172
+ StaticString mDirectInstanceRequestAddress;
173
+
169
174
  /*
170
175
  * The group that Ruby applications must run as.
171
176
  */
@@ -206,6 +211,11 @@ struct AutoGeneratedDirConfig {
206
211
  */
207
212
  StaticString mStartupFile;
208
213
 
214
+ /*
215
+ * The attributes to use for the sticky session cookie.
216
+ */
217
+ StaticString mStickySessionsCookieAttributes;
218
+
209
219
  /*
210
220
  * The cookie name to use for sticky sessions.
211
221
  */
@@ -249,6 +259,7 @@ struct AutoGeneratedDirConfig {
249
259
  StaticString mAppRootSourceFile;
250
260
  StaticString mAppStartCommandSourceFile;
251
261
  StaticString mAppTypeSourceFile;
262
+ StaticString mDirectInstanceRequestAddressSourceFile;
252
263
  StaticString mGroupSourceFile;
253
264
  StaticString mMeteorAppSettingsSourceFile;
254
265
  StaticString mNodejsSourceFile;
@@ -257,6 +268,7 @@ struct AutoGeneratedDirConfig {
257
268
  StaticString mRubySourceFile;
258
269
  StaticString mSpawnMethodSourceFile;
259
270
  StaticString mStartupFileSourceFile;
271
+ StaticString mStickySessionsCookieAttributesSourceFile;
260
272
  StaticString mStickySessionsCookieNameSourceFile;
261
273
  StaticString mUserSourceFile;
262
274
  StaticString mBaseURIsSourceFile;
@@ -284,6 +296,7 @@ struct AutoGeneratedDirConfig {
284
296
  unsigned int mAppRootSourceLine;
285
297
  unsigned int mAppStartCommandSourceLine;
286
298
  unsigned int mAppTypeSourceLine;
299
+ unsigned int mDirectInstanceRequestAddressSourceLine;
287
300
  unsigned int mGroupSourceLine;
288
301
  unsigned int mMeteorAppSettingsSourceLine;
289
302
  unsigned int mNodejsSourceLine;
@@ -292,6 +305,7 @@ struct AutoGeneratedDirConfig {
292
305
  unsigned int mRubySourceLine;
293
306
  unsigned int mSpawnMethodSourceLine;
294
307
  unsigned int mStartupFileSourceLine;
308
+ unsigned int mStickySessionsCookieAttributesSourceLine;
295
309
  unsigned int mStickySessionsCookieNameSourceLine;
296
310
  unsigned int mUserSourceLine;
297
311
  unsigned int mBaseURIsSourceLine;
@@ -319,6 +333,7 @@ struct AutoGeneratedDirConfig {
319
333
  bool mAppRootExplicitlySet: 1;
320
334
  bool mAppStartCommandExplicitlySet: 1;
321
335
  bool mAppTypeExplicitlySet: 1;
336
+ bool mDirectInstanceRequestAddressExplicitlySet: 1;
322
337
  bool mGroupExplicitlySet: 1;
323
338
  bool mMeteorAppSettingsExplicitlySet: 1;
324
339
  bool mNodejsExplicitlySet: 1;
@@ -327,6 +342,7 @@ struct AutoGeneratedDirConfig {
327
342
  bool mRubyExplicitlySet: 1;
328
343
  bool mSpawnMethodExplicitlySet: 1;
329
344
  bool mStartupFileExplicitlySet: 1;
345
+ bool mStickySessionsCookieAttributesExplicitlySet: 1;
330
346
  bool mStickySessionsCookieNameExplicitlySet: 1;
331
347
  bool mUserExplicitlySet: 1;
332
348
  bool mBaseURIsExplicitlySet: 1;
@@ -507,6 +523,15 @@ struct AutoGeneratedDirConfig {
507
523
  return mAppType;
508
524
  }
509
525
 
526
+ StaticString
527
+ getDirectInstanceRequestAddress() const {
528
+ if (mDirectInstanceRequestAddress.empty()) {
529
+ return P_STATIC_STRING("127.0.0.1");
530
+ } else {
531
+ return mDirectInstanceRequestAddress;
532
+ }
533
+ }
534
+
510
535
  StaticString
511
536
  getGroup() const {
512
537
  return mGroup;
@@ -563,6 +588,15 @@ struct AutoGeneratedDirConfig {
563
588
  return mStartupFile;
564
589
  }
565
590
 
591
+ StaticString
592
+ getStickySessionsCookieAttributes() const {
593
+ if (mStickySessionsCookieAttributes.empty()) {
594
+ return DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES;
595
+ } else {
596
+ return mStickySessionsCookieAttributes;
597
+ }
598
+ }
599
+
566
600
  StaticString
567
601
  getStickySessionsCookieName() const {
568
602
  if (mStickySessionsCookieName.empty()) {
@@ -48,6 +48,7 @@
48
48
  #define DEFAULT_APP_OUTPUT_LOG_LEVEL 3
49
49
  #define DEFAULT_APP_OUTPUT_LOG_LEVEL_NAME "notice"
50
50
  #define DEFAULT_APP_THREAD_COUNT 1
51
+ #define DEFAULT_BIND_ADDRESS "127.0.0.1"
51
52
  #define DEFAULT_CONCURRENCY_MODEL "process"
52
53
  #define DEFAULT_FILE_BUFFERED_CHANNEL_THRESHOLD 131072
53
54
  #define DEFAULT_HTTP_SERVER_LISTEN_ADDRESS "tcp://127.0.0.1:3000"
@@ -71,7 +72,7 @@
71
72
  #define DEFAULT_STICKY_SESSIONS_COOKIE_ATTRIBUTES "SameSite=Lax; Secure;"
72
73
  #define DEFAULT_STICKY_SESSIONS_COOKIE_NAME "_passenger_route"
73
74
  #define DEFAULT_WEB_APP_USER "nobody"
74
- #define ENTERPRISE_URL "https://www.phusionpassenger.com/enterprise"
75
+ #define ENTERPRISE_URL "https://www.phusionpassenger.com/features#premium-features"
75
76
  #define FEEDBACK_FD 3
76
77
  #define FLYING_PASSENGER_NAME "Flying Passenger"
77
78
  #define GLOBAL_NAMESPACE_DIRNAME "passenger"
@@ -82,7 +83,7 @@
82
83
  #define PASSENGER_API_VERSION_MAJOR 0
83
84
  #define PASSENGER_API_VERSION_MINOR 3
84
85
  #define PASSENGER_DEFAULT_USER "nobody"
85
- #define PASSENGER_VERSION "6.0.6"
86
+ #define PASSENGER_VERSION "6.0.7"
86
87
  #define POOL_HELPER_THREAD_STACK_SIZE 262144
87
88
  #define PROCESS_SHUTDOWN_TIMEOUT 60
88
89
  #define PROCESS_SHUTDOWN_TIMEOUT_DISPLAY "1 minute"
@@ -80,6 +80,7 @@ namespace {
80
80
  key.append(1, toupper(*data));
81
81
  data++;
82
82
  }
83
+ if (key == "PASSENGER_CONFIG_MANIFEST") continue;
83
84
  switch (it->type()) {
84
85
  case Json::nullValue:
85
86
  case Json::stringValue:
@@ -11,10 +11,6 @@
11
11
  typedef uint32_t modp_uint32_t;
12
12
  #endif
13
13
 
14
- #ifndef MODP_B64_DONT_INCLUDE_BOOST_ENDIANNESS_HEADERS
15
- #include <boost/detail/endian.hpp>
16
- #endif
17
-
18
14
  /**
19
15
  * you can control if we use padding by commenting out this
20
16
  * next line. However, I highly recommend you use padding and not
@@ -26,6 +26,10 @@
26
26
 
27
27
  #include "modp_b64_data.h"
28
28
 
29
+ #ifndef MODP_B64_DONT_INCLUDE_BOOST_ENDIANNESS_HEADERS
30
+ #include <boost/predef/other/endian.h>
31
+ #endif
32
+
29
33
  /* public header */
30
34
  #include "modp_b64.h"
31
35
 
@@ -85,7 +89,7 @@ size_t modp_b64_decode(char* dest, const char* src, size_t len)
85
89
  case 0:
86
90
  x = d0[y[3]] | d1[y[2]] | d2[y[1]] | d3[y[0]];
87
91
  if (x >= B64_BADCHAR) return -1;
88
- #ifdef BOOST_BIG_ENDIAN
92
+ #ifdef BOOST_ENDIAN_BIG_BYTE
89
93
  *p++ = ((modp_uint8_t*)&x)[1];
90
94
  *p++ = ((modp_uint8_t*)&x)[2];
91
95
  *p = ((modp_uint8_t*)&x)[3];
@@ -135,7 +135,7 @@ setupEnvironment(options);
135
135
 
136
136
  function tryWriteFile(path, contents) {
137
137
  try {
138
- fs.writeFileSync(path, contents);
138
+ fs.writeFileSync(path, contents.toString());
139
139
  } catch (e) {
140
140
  console.error('Warning: unable to write to ' + path + ': ' + e.message);
141
141
  }
@@ -446,6 +446,14 @@
446
446
  offsetof(passenger_loc_conf_t, autogenerated.spawn_method),
447
447
  NULL
448
448
  },
449
+ {
450
+ ngx_string("passenger_direct_instance_request_address"),
451
+ NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
452
+ passenger_conf_set_direct_instance_request_address,
453
+ NGX_HTTP_LOC_CONF_OFFSET,
454
+ offsetof(passenger_loc_conf_t, autogenerated.direct_instance_request_address),
455
+ NULL
456
+ },
449
457
  {
450
458
  ngx_string("passenger_load_shell_envvars"),
451
459
  NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,