passenger 4.0.41 → 4.0.42

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.

Files changed (136) hide show
  1. checksums.yaml +8 -8
  2. checksums.yaml.gz.asc +7 -7
  3. data.tar.gz.asc +7 -7
  4. data/.travis.yml +3 -3
  5. data/CHANGELOG +26 -0
  6. data/build/agents.rb +1 -1
  7. data/build/apache2.rb +3 -0
  8. data/build/debian.rb +1 -1
  9. data/build/integration_tests.rb +4 -4
  10. data/build/nginx.rb +3 -0
  11. data/build/packaging.rb +3 -5
  12. data/build/preprocessor.rb +2 -1
  13. data/build/ruby_extension.rb +5 -5
  14. data/build/test_basics.rb +2 -1
  15. data/debian.template/control.template +9 -4
  16. data/debian.template/rules.template +16 -4
  17. data/dev/run_travis.sh +32 -8
  18. data/doc/Users guide Apache.txt +55 -10
  19. data/doc/Users guide Nginx.txt +10 -8
  20. data/doc/Users guide Standalone.txt +5 -2
  21. data/doc/users_guide_snippets/installation.txt +14 -0
  22. data/ext/common/ApplicationPool2/Process.h +8 -0
  23. data/ext/common/ApplicationPool2/Spawner.h +51 -1
  24. data/ext/common/Constants.h +1 -1
  25. data/ext/common/Utils/Curl.h +4 -0
  26. data/ext/common/agents/HelperAgent/RequestHandler.h +14 -2
  27. data/ext/common/agents/LoggingAgent/LoggingServer.h +4 -4
  28. data/ext/common/agents/LoggingAgent/RemoteSender.h +66 -5
  29. data/ext/nginx/StaticContentHandler.c +0 -7
  30. data/lib/phusion_passenger.rb +3 -3
  31. data/lib/phusion_passenger/config/about_command.rb +0 -4
  32. data/lib/phusion_passenger/config/build_native_support_command.rb +78 -0
  33. data/lib/phusion_passenger/config/detach_process_command.rb +0 -4
  34. data/lib/phusion_passenger/config/main.rb +12 -5
  35. data/lib/phusion_passenger/config/restart_app_command.rb +0 -4
  36. data/lib/phusion_passenger/config/validate_install_command.rb +0 -4
  37. data/lib/phusion_passenger/platform_info/compiler.rb +58 -41
  38. data/lib/phusion_passenger/platform_info/cxx_portability.rb +5 -0
  39. data/lib/phusion_passenger/standalone/command.rb +29 -10
  40. data/lib/phusion_passenger/standalone/help_command.rb +2 -2
  41. data/lib/phusion_passenger/standalone/start_command.rb +5 -1
  42. data/lib/phusion_passenger/utils/tee_input.rb +1 -0
  43. data/resources/mime.types +1 -1
  44. data/resources/oss-binaries.phusionpassenger.com.crt +124 -0
  45. data/resources/templates/apache2/deployment_example.txt.erb +2 -0
  46. data/resources/templates/standalone/config.erb +3 -1
  47. data/resources/templates/undisclosed_error.html.template +38 -1
  48. data/resources/union_station_gateway.crt +21 -0
  49. data/test/cxx/ApplicationPool2/SpawnerTestCases.cpp +34 -0
  50. data/test/cxx/RequestHandlerTest.cpp +10 -3
  51. data/test/cxx/TemplateTest.cpp +1 -1
  52. data/test/integration_tests/apache2_tests.rb +90 -106
  53. data/test/integration_tests/nginx_tests.rb +2 -0
  54. data/test/stub/rack/config.ru +7 -14
  55. data/test/stub/rack/library.rb +16 -0
  56. data/test/support/test_helper.rb +0 -3
  57. metadata +4 -80
  58. metadata.gz.asc +7 -7
  59. data/test/stub/rails2.3-mycook/Rakefile +0 -10
  60. data/test/stub/rails2.3-mycook/app/controllers/application_controller.rb +0 -12
  61. data/test/stub/rails2.3-mycook/app/controllers/recipes_controller.rb +0 -5
  62. data/test/stub/rails2.3-mycook/app/controllers/uploads_controller.rb +0 -15
  63. data/test/stub/rails2.3-mycook/app/controllers/welcome_controller.rb +0 -71
  64. data/test/stub/rails2.3-mycook/app/helpers/application_helper.rb +0 -3
  65. data/test/stub/rails2.3-mycook/app/helpers/recipes_helper.rb +0 -2
  66. data/test/stub/rails2.3-mycook/app/helpers/test_helper.rb +0 -2
  67. data/test/stub/rails2.3-mycook/app/helpers/uploads_helper.rb +0 -2
  68. data/test/stub/rails2.3-mycook/app/helpers/welcome_helper.rb +0 -2
  69. data/test/stub/rails2.3-mycook/app/views/layouts/default.rhtml +0 -26
  70. data/test/stub/rails2.3-mycook/app/views/recipes/create.rhtml +0 -13
  71. data/test/stub/rails2.3-mycook/app/views/recipes/index.rhtml +0 -3
  72. data/test/stub/rails2.3-mycook/app/views/recipes/new.rhtml +0 -8
  73. data/test/stub/rails2.3-mycook/app/views/uploads/index.rhtml +0 -1
  74. data/test/stub/rails2.3-mycook/app/views/uploads/new.html.erb +0 -8
  75. data/test/stub/rails2.3-mycook/app/views/welcome/cached.rhtml +0 -1
  76. data/test/stub/rails2.3-mycook/app/views/welcome/index.rhtml +0 -20
  77. data/test/stub/rails2.3-mycook/config/boot.rb +0 -110
  78. data/test/stub/rails2.3-mycook/config/database.yml +0 -19
  79. data/test/stub/rails2.3-mycook/config/environment.rb +0 -61
  80. data/test/stub/rails2.3-mycook/config/environments/development.rb +0 -18
  81. data/test/stub/rails2.3-mycook/config/environments/production.rb +0 -19
  82. data/test/stub/rails2.3-mycook/config/initializers/inflections.rb +0 -10
  83. data/test/stub/rails2.3-mycook/config/initializers/mime_types.rb +0 -5
  84. data/test/stub/rails2.3-mycook/config/routes.rb +0 -38
  85. data/test/stub/rails2.3-mycook/log/useless.txt +0 -1
  86. data/test/stub/rails2.3-mycook/public/.htaccess +0 -42
  87. data/test/stub/rails2.3-mycook/public/404.html +0 -30
  88. data/test/stub/rails2.3-mycook/public/422.html +0 -30
  89. data/test/stub/rails2.3-mycook/public/500.html +0 -30
  90. data/test/stub/rails2.3-mycook/public/dispatch.cgi +0 -10
  91. data/test/stub/rails2.3-mycook/public/dispatch.fcgi +0 -24
  92. data/test/stub/rails2.3-mycook/public/dispatch.rb +0 -10
  93. data/test/stub/rails2.3-mycook/public/favicon.ico +0 -0
  94. data/test/stub/rails2.3-mycook/public/images/angrywizard.gif +0 -0
  95. data/test/stub/rails2.3-mycook/public/images/cookbook.gif +0 -0
  96. data/test/stub/rails2.3-mycook/public/images/header.png +0 -0
  97. data/test/stub/rails2.3-mycook/public/images/rails.png +0 -0
  98. data/test/stub/rails2.3-mycook/public/robots.txt +0 -5
  99. data/test/stub/rails2.3-mycook/public/uploads.html +0 -26
  100. data/test/stub/rails2.3-mycook/public/uploads/.gitignore +0 -0
  101. data/test/stub/rails2.3-mycook/public/welcome/cached.html +0 -26
  102. data/test/stub/rails2.3-mycook/script/about +0 -3
  103. data/test/stub/rails2.3-mycook/script/console +0 -3
  104. data/test/stub/rails2.3-mycook/script/dbconsole +0 -3
  105. data/test/stub/rails2.3-mycook/script/destroy +0 -3
  106. data/test/stub/rails2.3-mycook/script/generate +0 -3
  107. data/test/stub/rails2.3-mycook/script/performance/benchmarker +0 -3
  108. data/test/stub/rails2.3-mycook/script/performance/profiler +0 -3
  109. data/test/stub/rails2.3-mycook/script/performance/request +0 -3
  110. data/test/stub/rails2.3-mycook/script/plugin +0 -3
  111. data/test/stub/rails2.3-mycook/script/process/inspector +0 -3
  112. data/test/stub/rails2.3-mycook/script/process/reaper +0 -3
  113. data/test/stub/rails2.3-mycook/script/process/spawner +0 -3
  114. data/test/stub/rails2.3-mycook/script/runner +0 -3
  115. data/test/stub/rails2.3-mycook/script/server +0 -3
  116. data/test/stub/rails2.3-mycook/sites/some.site/public/uploads.html +0 -26
  117. data/test/stub/rails2.3-mycook/sites/some.site/public/welcome/cached.html +0 -26
  118. data/test/stub/rails2.3-mycook/tmp/cache/useless.txt +0 -1
  119. data/test/stub/rails2.3-mycook/tmp/pids/useless.txt +0 -1
  120. data/test/stub/rails2.3-mycook/tmp/sessions/useless.txt +0 -1
  121. data/test/stub/rails2.3-mycook/tmp/sockets/useless.txt +0 -1
  122. data/test/stub/vendor_rails/minimal/README +0 -1
  123. data/test/stub/vendor_rails/minimal/actionmailer/lib/action_mailer.rb +0 -0
  124. data/test/stub/vendor_rails/minimal/actionpack/lib/action_controller.rb +0 -22
  125. data/test/stub/vendor_rails/minimal/actionpack/lib/action_pack.rb +0 -0
  126. data/test/stub/vendor_rails/minimal/actionpack/lib/action_view.rb +0 -0
  127. data/test/stub/vendor_rails/minimal/activerecord/lib/active_record.rb +0 -7
  128. data/test/stub/vendor_rails/minimal/activeresource/lib/active_resource.rb +0 -0
  129. data/test/stub/vendor_rails/minimal/activesupport/lib/active_support.rb +0 -17
  130. data/test/stub/vendor_rails/minimal/activesupport/lib/active_support/whiny_nil.rb +0 -0
  131. data/test/stub/vendor_rails/minimal/railties/lib/dispatcher.rb +0 -0
  132. data/test/stub/vendor_rails/minimal/railties/lib/initializer.rb +0 -57
  133. data/test/stub/vendor_rails/minimal/railties/lib/ruby_version_check.rb +0 -1
  134. data/test/stub/zsfa/header.png +0 -0
  135. data/test/stub/zsfa/index.html +0 -14
  136. data/test/stub/zsfa/zsfa.png +0 -0
@@ -33,10 +33,6 @@ module Config
33
33
  class DetachProcessCommand < Command
34
34
  include PhusionPassenger::Config::Utils
35
35
 
36
- def self.description
37
- return "Detach an application process from the process pool"
38
- end
39
-
40
36
  def run
41
37
  parse_options
42
38
  select_passenger_instance
@@ -30,6 +30,7 @@ module Config
30
30
  KNOWN_COMMANDS = [
31
31
  ["detach-process", "DetachProcessCommand"],
32
32
  ["restart-app", "RestartAppCommand"],
33
+ ["build-native-support", "BuildNativeSupportCommand"],
33
34
  ["validate-install", "ValidateInstallCommand"],
34
35
  ["about", "AboutCommand"]
35
36
  ]
@@ -68,11 +69,17 @@ module Config
68
69
  puts "Usage: passenger-config <COMMAND> [options]"
69
70
  puts "Tool for controlling or configurating a #{PROGRAM_NAME} instance or installation."
70
71
  puts
71
- puts "Available commands:"
72
- KNOWN_COMMANDS.each do |props|
73
- command_class = lookup_command_class_by_class_name(props[1])
74
- printf " %-18s %s\n", props[0], command_class.description
75
- end
72
+ puts "Management commands:"
73
+ puts " detach-process Detach an application process from the process pool"
74
+ puts " restart-app Restart an application"
75
+ puts
76
+ puts "Informational commands:"
77
+ puts " validate-install Validate this Phusion Passenger installation"
78
+ puts " about Show information about Phusion Passenger"
79
+ puts
80
+ puts "Miscellaneous commands:"
81
+ puts " build-native-support Ensure that the native_support library for the current"
82
+ puts " Ruby interpeter is built"
76
83
  puts
77
84
  puts "Type 'passenger-config <COMMAND> --help' for more information."
78
85
  end
@@ -33,10 +33,6 @@ module Config
33
33
  class RestartAppCommand < Command
34
34
  include PhusionPassenger::Config::Utils
35
35
 
36
- def self.description
37
- return "Restart an application"
38
- end
39
-
40
36
  def run
41
37
  parse_options
42
38
  select_passenger_instance
@@ -34,10 +34,6 @@ class ValidateInstallCommand < Command
34
34
  # Signifies that there are no error, but at least 1 warning.
35
35
  WARN_EXIT_CODE = 2
36
36
 
37
- def self.description
38
- return "Validate this #{PROGRAM_NAME} installation"
39
- end
40
-
41
37
  def self.help
42
38
  puts "Usage: passenger-config validate-install"
43
39
  puts "Validate this #{PROGRAM_NAME} installation."
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2010-2013 Phusion
2
+ # Copyright (c) 2010-2014 Phusion
3
3
  #
4
4
  # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
5
5
  #
@@ -248,14 +248,27 @@ public
248
248
  create_temp_file("passenger-compile-check.#{extension}") do |filename, f|
249
249
  f.puts(source)
250
250
  f.close
251
- begin
252
- command = create_compiler_command(language,
253
- "-c '#{filename}' -o '#{filename}.o'",
254
- flags)
255
- return run_compiler(description, command, filename, source)
256
- ensure
257
- File.unlink("#{filename}.o") rescue nil
258
- end
251
+ command = create_compiler_command(language,
252
+ "-c '#{filename}' -o '#{filename}.o'",
253
+ flags)
254
+ return run_compiler(description, command, filename, source)
255
+ end
256
+ end
257
+
258
+ # Like try_compile, but designed for checking whether a warning flag is
259
+ # supported. Compilers sometimes do not error out upon encountering an
260
+ # unsupported warning flag, but merely print a warning. This method checks
261
+ # for that too.
262
+ def self.try_compile_with_warning_flag(description, language, source, flags = nil)
263
+ extension = detect_language_extension(language)
264
+ create_temp_file("passenger-compile-check.#{extension}") do |filename, f|
265
+ f.puts(source)
266
+ f.close
267
+ command = create_compiler_command(language,
268
+ "-c '#{filename}' -o '#{filename}.o'",
269
+ flags)
270
+ result = run_compiler(description, command, filename, source, true)
271
+ return result[:result] && result[:output] !~ /unknown warning option/i
259
272
  end
260
273
  end
261
274
 
@@ -264,14 +277,10 @@ public
264
277
  create_temp_file("passenger-link-check.#{extension}") do |filename, f|
265
278
  f.puts(source)
266
279
  f.close
267
- begin
268
- command = create_compiler_command(language,
269
- "'#{filename}' -o '#{filename}.out'",
270
- flags, true)
271
- return run_compiler(description, command, filename, source)
272
- ensure
273
- File.unlink("#{filename}.out") rescue nil
274
- end
280
+ command = create_compiler_command(language,
281
+ "'#{filename}' -o '#{filename}.out'",
282
+ flags, true)
283
+ return run_compiler(description, command, filename, source)
275
284
  end
276
285
  end
277
286
 
@@ -280,26 +289,22 @@ public
280
289
  create_temp_file("passenger-run-check.#{extension}", tmpexedir) do |filename, f|
281
290
  f.puts(source)
282
291
  f.close
283
- begin
284
- command = create_compiler_command(language,
285
- "'#{filename}' -o '#{filename}.out'",
286
- flags, true)
287
- if run_compiler(description, command, filename, source)
288
- log("Running #{filename}.out")
289
- begin
290
- output = `'#{filename}.out' 2>&1`
291
- rescue SystemCallError => e
292
- log("Command failed: #{e}")
293
- return false
294
- end
295
- status = $?.exitstatus
296
- log("Command exited with status #{status}. Output:\n--------------\n#{output}\n--------------")
297
- return status == 0
298
- else
292
+ command = create_compiler_command(language,
293
+ "'#{filename}' -o '#{filename}.out'",
294
+ flags, true)
295
+ if run_compiler(description, command, filename, source)
296
+ log("Running #{filename}.out")
297
+ begin
298
+ output = `'#{filename}.out' 2>&1`
299
+ rescue SystemCallError => e
300
+ log("Command failed: #{e}")
299
301
  return false
300
302
  end
301
- ensure
302
- File.unlink("#{filename}.out") rescue nil
303
+ status = $?.exitstatus
304
+ log("Command exited with status #{status}. Output:\n--------------\n#{output}\n--------------")
305
+ return status == 0
306
+ else
307
+ return false
303
308
  end
304
309
  end
305
310
  end
@@ -326,29 +331,40 @@ public
326
331
  memoize :cxx_supports_visibility_flag?, true
327
332
 
328
333
  def self.cc_supports_wno_attributes_flag?
329
- return try_compile("Checking for C compiler '-Wno-attributes' support",
334
+ return try_compile_with_warning_flag(
335
+ "Checking for C compiler '-Wno-attributes' support",
330
336
  :c, '', '-Wno-attributes')
331
337
  end
332
338
  memoize :cc_supports_wno_attributes_flag?, true
333
339
 
334
340
  def self.cxx_supports_wno_attributes_flag?
335
- return try_compile("Checking for C++ compiler '-Wno-attributes' support",
341
+ return try_compile_with_warning_flag(
342
+ "Checking for C++ compiler '-Wno-attributes' support",
336
343
  :cxx, '', '-Wno-attributes')
337
344
  end
338
345
  memoize :cxx_supports_wno_attributes_flag?, true
339
346
 
340
347
  def self.cc_supports_wno_missing_field_initializers_flag?
341
- return try_compile("Checking for C compiler '-Wno-missing-field-initializers' support",
348
+ return try_compile_with_warning_flag(
349
+ "Checking for C compiler '-Wno-missing-field-initializers' support",
342
350
  :c, '', '-Wno-missing-field-initializers')
343
351
  end
344
352
  memoize :cc_supports_wno_missing_field_initializers_flag?, true
345
353
 
346
354
  def self.cxx_supports_wno_missing_field_initializers_flag?
347
- return try_compile("Checking for C++ compiler '-Wno-missing-field-initializers' support",
355
+ return try_compile_with_warning_flag(
356
+ "Checking for C++ compiler '-Wno-missing-field-initializers' support",
348
357
  :cxx, '', '-Wno-missing-field-initializers')
349
358
  end
350
359
  memoize :cxx_supports_wno_missing_field_initializers_flag?, true
351
-
360
+
361
+ def self.cxx_supports_wno_unused_local_typedefs_flag?
362
+ return try_compile_with_warning_flag(
363
+ "Checking for C++ compiler '-Wno-unused-local-typedefs' support",
364
+ :cxx, '', '-Wno-unused-local-typedefs')
365
+ end
366
+ memoize :cxx_supports_wno_unused_local_typedefs_flag?, true
367
+
352
368
  def self.cc_supports_no_tls_direct_seg_refs_option?
353
369
  return try_compile("Checking for C compiler '-mno-tls-direct-seg-refs' support",
354
370
  :c, '', '-mno-tls-direct-seg-refs')
@@ -362,7 +378,8 @@ public
362
378
  memoize :cxx_supports_no_tls_direct_seg_refs_option?, true
363
379
 
364
380
  def self.compiler_supports_wno_ambiguous_member_template?
365
- result = try_compile("Checking for C++ compiler '-Wno-ambiguous-member-template' support",
381
+ result = try_compile_with_warning_flag(
382
+ "Checking for C++ compiler '-Wno-ambiguous-member-template' support",
366
383
  :cxx, '', '-Wno-ambiguous-member-template')
367
384
  return false if !result
368
385
 
@@ -154,6 +154,11 @@ private
154
154
  if cc_or_cxx == :cxx
155
155
  flags << cxx_11_flag if cxx_11_flag
156
156
 
157
+ if cxx_supports_wno_unused_local_typedefs_flag?
158
+ # Avoids some compilaton warnings with Boost on Ubuntu 14.04.
159
+ flags << "-Wno-unused-local-typedefs"
160
+ end
161
+
157
162
  # There are too many implementations of of the hash map!
158
163
  # Figure out the right one.
159
164
  check_unordered_map(flags, "std::unordered_map", "unordered_map", "HAS_UNORDERED_MAP") ||
@@ -31,14 +31,13 @@ class Command
31
31
  DEFAULT_OPTIONS = {
32
32
  :address => '0.0.0.0',
33
33
  :port => 3000,
34
- :environment => ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development',
34
+ :environment => ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['NODE_ENV'] || ENV['PASSENGER_APP_ENV'] || 'development',
35
35
  :max_pool_size => 6,
36
36
  :min_instances => 1,
37
37
  :spawn_method => Kernel.respond_to?(:fork) ? 'smart' : 'direct',
38
38
  :concurrency_model => DEFAULT_CONCURRENCY_MODEL,
39
39
  :thread_count => DEFAULT_THREAD_COUNT,
40
- :nginx_version => PREFERRED_NGINX_VERSION,
41
- :friendly_error_pages => true
40
+ :nginx_version => PREFERRED_NGINX_VERSION
42
41
  }.freeze
43
42
 
44
43
  include Utils
@@ -69,16 +68,21 @@ private
69
68
  too_old = true
70
69
  end
71
70
  if too_old
71
+ PhusionPassenger.require_passenger_lib 'platform_info/ruby'
72
+ gem_command = PlatformInfo.gem_command(:sudo => true)
72
73
  error "Your version of daemon_controller is too old. " <<
73
74
  "You must install 1.1.0 or later. Please upgrade:\n\n" <<
74
75
 
75
- " sudo gem uninstall FooBarWidget-daemon_controller\n" <<
76
- " sudo gem install daemon_controller"
76
+ " #{gem_command} uninstall FooBarWidget-daemon_controller\n" <<
77
+ " #{gem_command} install daemon_controller",
78
+ :wrap => false
77
79
  exit 1
78
80
  end
79
81
  rescue LoadError
82
+ PhusionPassenger.require_passenger_lib 'platform_info/ruby'
83
+ gem_command = PlatformInfo.gem_command(:sudo => true)
80
84
  error "Please install daemon_controller first:\n\n" <<
81
- " sudo gem install daemon_controller"
85
+ " #{gem_command} install daemon_controller"
82
86
  exit 1
83
87
  end
84
88
  end
@@ -128,11 +132,22 @@ private
128
132
  end
129
133
  end
130
134
 
131
- def error(message)
135
+ def error(message, options = {})
136
+ wrap = options.fetch(:wrap, true)
132
137
  if message =~ /\n/
133
- STDERR.puts("*** ERROR ***\n" << wrap_desc(message, 80, 0))
138
+ if wrap
139
+ processed_message = wrap_desc(message, 80, 0)
140
+ else
141
+ processed_message = message
142
+ end
143
+ STDERR.puts("*** ERROR ***\n" << processed_message)
134
144
  else
135
- STDERR.puts(wrap_desc("*** ERROR: #{message}", 80, 0))
145
+ if wrap
146
+ processed_message = wrap_desc("*** ERROR: #{message}", 80, 0)
147
+ else
148
+ processed_message = "*** ERROR: #{message}"
149
+ end
150
+ STDERR.puts(processed_message)
136
151
  end
137
152
  @plugin.call_hook(:error, message) if @plugin
138
153
  end
@@ -218,7 +233,7 @@ private
218
233
  File.open(@config_filename, 'w') do |f|
219
234
  f.chmod(0644)
220
235
  require_erb
221
- erb = ERB.new(File.read(nginx_config_template_filename))
236
+ erb = ERB.new(File.read(nginx_config_template_filename), nil, "-")
222
237
  current_user = Etc.getpwuid(Process.uid).name
223
238
 
224
239
  # The template requires some helper methods which are defined in start_command.rb.
@@ -237,6 +252,10 @@ private
237
252
  end
238
253
  end
239
254
 
255
+ def boolean_config_value(val)
256
+ return val ? "on" : "off"
257
+ end
258
+
240
259
  def serialize_strset(*items)
241
260
  if "".respond_to?(:force_encoding)
242
261
  items = items.map { |x| x.force_encoding('binary') }
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2010 Phusion
2
+ # Copyright (c) 2010-2014 Phusion
3
3
  #
4
4
  # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
5
5
  #
@@ -31,7 +31,7 @@ class HelpCommand < Command
31
31
  end
32
32
 
33
33
  def run
34
- puts "Phusion Passenger Standalone, the easiest way to deploy Ruby web apps."
34
+ puts "Phusion Passenger Standalone, the easiest way to deploy web apps."
35
35
  puts
36
36
  puts "Available commands:"
37
37
  puts
@@ -186,8 +186,12 @@ private
186
186
  wrap_desc("Enable deployment error resistance (Enterprise only)")) do
187
187
  @options[:resist_deployment_errors] = true
188
188
  end
189
+ opts.on("--friendly-error-pages",
190
+ wrap_desc("Turn on friendly error pages")) do
191
+ @options[:friendly_error_pages] = true
192
+ end
189
193
  opts.on("--no-friendly-error-pages",
190
- wrap_desc("Disable passenger_friendly_error_pages")) do
194
+ wrap_desc("Turn off friendly error pages")) do
191
195
  @options[:friendly_error_pages] = false
192
196
  end
193
197
  opts.on("--ssl",
@@ -106,6 +106,7 @@ class TeeInput
106
106
  else
107
107
  @tmp = TmpIO.new("PassengerTeeInput")
108
108
  end
109
+ @tmp.binmode
109
110
  end
110
111
 
111
112
  def close
@@ -26,7 +26,7 @@ types {
26
26
 
27
27
  application/x-font-ttf ttf;
28
28
  font/opentype otf;
29
- font/x-woff woff;
29
+ application/font-woff woff;
30
30
  application/vnd.ms-fontobject eot;
31
31
 
32
32
  application/java-archive jar war ear;
@@ -82,3 +82,127 @@ Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
82
82
  c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
83
83
  mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
84
84
  -----END CERTIFICATE-----
85
+ -----BEGIN CERTIFICATE-----
86
+ MIIFiTCCBHGgAwIBAgIRAL9IMkS19yW5Mi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MEcw
102
+ OwYMKwYBBAGyMQECAQMEMCswKQYIKwYBBQUHAgEWHWh0dHBzOi8vc2VjdXJlLmNv
103
+ bW9kby5uZXQvQ1BTMAgGBmeBDAECATBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8v
104
+ Y3JsLmNvbW9kb2NhLmNvbS9DT01PRE9SU0FEb21haW5WYWxpZGF0aW9uU2VjdXJl
105
+ U2VydmVyQ0EuY3JsMIGFBggrBgEFBQcBAQR5MHcwTwYIKwYBBQUHMAKGQ2h0dHA6
106
+ Ly9jcnQuY29tb2RvY2EuY29tL0NPTU9ET1JTQURvbWFpblZhbGlkYXRpb25TZWN1
107
+ cmVTZXJ2ZXJDQS5jcnQwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmNvbW9kb2Nh
108
+ LmNvbTBTBgNVHREETDBKgiFvc3MtYmluYXJpZXMucGh1c2lvbnBhc3Nlbmdlci5j
109
+ b22CJXd3dy5vc3MtYmluYXJpZXMucGh1c2lvbnBhc3Nlbmdlci5jb20wDQYJKoZI
110
+ hvcNAQELBQADggEBABx5Q+/JG7p7KGGM29reQQWYllY2r/qhkQYYZTpClehECckN
111
+ DZyweY7JN9yYK5OZK7kEbZnuW0VQm0pRfC0+k1bg9dM0uVrW5BOgAk10qj9y1N3y
112
+ x6dOtsJ+OGrFu5vK03QDQsYpUwtPMioM4d2Us+2YlfxHqmjRkFuMZvfcS4HHM6v/
113
+ qrrceb9+tOGi6DPoXV6XixChKZ95h0PJDogc+SFoev4WJOfQSi2VbZywSZVF/brR
114
+ /4QtWantedDESQAnmWZegEQTNupLIT/HseNR+5s3c7YrDDxHZdAKefOd6cbBomqb
115
+ uvzhX9c6lX5CZKsl7bq+JBV6fBtzhrqhUspdDXY=
116
+ -----END CERTIFICATE-----
117
+ -----BEGIN CERTIFICATE-----
118
+ MIIGCDCCA/CgAwIBAgIQKy5u6tl1NmwUim7bo3yMBzANBgkqhkiG9w0BAQwFADCB
119
+ hTELMAkGA1UEB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