passenger 2.2.11 → 2.2.12
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.
- data/NEWS +29 -0
- data/bin/passenger-install-nginx-module +1 -1
- data/doc/Users guide Apache.html +38 -7
- data/doc/Users guide Nginx.html +36 -5
- data/doc/cxxapi/AbstractSpawnManager_8h-source.html +1 -1
- data/doc/cxxapi/Account_8h-source.html +1 -1
- data/doc/cxxapi/AccountsDatabase_8h-source.html +1 -1
- data/doc/cxxapi/AgentsStarter_8h-source.html +1 -1
- data/doc/cxxapi/BCrypt_8h-source.html +1 -1
- data/doc/cxxapi/Blowfish_8h-source.html +1 -1
- data/doc/cxxapi/Bucket_8h-source.html +5 -4
- data/doc/cxxapi/Constants_8h-source.html +2 -2
- data/doc/cxxapi/ContentHandler_8h-source.html +1 -1
- data/doc/cxxapi/DirectoryMapper_8h-source.html +10 -9
- data/doc/cxxapi/EventedServer_8h-source.html +415 -0
- data/doc/cxxapi/Exceptions_8h-source.html +1 -1
- data/doc/cxxapi/FileDescriptor_8h-source.html +1 -1
- data/doc/cxxapi/Hooks_8h-source.html +3 -2
- data/doc/cxxapi/HttpStatusExtractor_8h-source.html +324 -323
- data/doc/cxxapi/Logging_8h-source.html +643 -546
- data/doc/cxxapi/MessageChannel_8h-source.html +429 -404
- data/doc/cxxapi/MessageClient_8h-source.html +1 -1
- data/doc/cxxapi/MessageReadersWriters_8h-source.html +451 -0
- data/doc/cxxapi/MessageServer_8h-source.html +1 -1
- data/doc/cxxapi/PoolOptions_8h-source.html +287 -279
- data/doc/cxxapi/Process_8h-source.html +178 -167
- data/doc/cxxapi/RandomGenerator_8h-source.html +45 -18
- data/doc/cxxapi/ResourceLocator_8h-source.html +3 -3
- data/doc/cxxapi/ScgiRequestParser_8h-source.html +344 -343
- data/doc/cxxapi/ServerInstanceDir_8h-source.html +1 -1
- data/doc/cxxapi/Session_8h-source.html +387 -374
- data/doc/cxxapi/SpawnManager_8h-source.html +547 -538
- data/doc/cxxapi/StaticContentHandler_8h-source.html +1 -1
- data/doc/cxxapi/StaticString_8h-source.html +1 -1
- data/doc/cxxapi/StringListCreator_8h-source.html +1 -1
- data/doc/cxxapi/Utils_8h-source.html +545 -520
- data/doc/cxxapi/annotated.html +11 -8
- data/doc/cxxapi/apache2_2Configuration_8h-source.html +1 -1
- data/doc/cxxapi/classAgentWatcher-members.html +1 -1
- data/doc/cxxapi/classAgentWatcher.html +1 -1
- data/doc/cxxapi/classClient-members.html +1 -1
- data/doc/cxxapi/classClient.html +1 -1
- data/doc/cxxapi/classHooks-members.html +16 -13
- data/doc/cxxapi/classHooks.html +69 -73
- data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager.html +1 -1
- data/doc/cxxapi/classPassenger_1_1ArgumentException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1ArgumentException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1ArrayReader-members.html +33 -0
- data/doc/cxxapi/classPassenger_1_1ArrayReader.html +47 -0
- data/doc/cxxapi/classPassenger_1_1BufferedUpload-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1BufferedUpload.html +1 -1
- data/doc/cxxapi/classPassenger_1_1BusyException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1BusyException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +18 -15
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +89 -99
- data/doc/cxxapi/classPassenger_1_1EOFException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1EOFException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1EventFd-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1EventFd.html +1 -1
- data/doc/cxxapi/classPassenger_1_1FileDescriptor-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1FileDescriptor.html +1 -1
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1FileSystemException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1HttpStatusExtractor-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1HttpStatusExtractor.html +2 -2
- data/doc/cxxapi/classPassenger_1_1IOException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1IOException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1MemZeroGuard-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1MemZeroGuard.html +1 -1
- data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1MessageChannel.html +1 -1
- data/doc/cxxapi/classPassenger_1_1MessageServer-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1MessageServer.html +1 -1
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext.html +1 -1
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext.html +1 -1
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler.html +1 -1
- data/doc/cxxapi/classPassenger_1_1Process-members.html +4 -3
- data/doc/cxxapi/classPassenger_1_1Process.html +40 -9
- data/doc/cxxapi/classPassenger_1_1RandomGenerator-members.html +2 -1
- data/doc/cxxapi/classPassenger_1_1RandomGenerator.html +29 -2
- data/doc/cxxapi/classPassenger_1_1RuntimeException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1RuntimeException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1ScalarReader-members.html +33 -0
- data/doc/cxxapi/classPassenger_1_1ScalarReader.html +47 -0
- data/doc/cxxapi/classPassenger_1_1ScgiRequestParser-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1ScgiRequestParser.html +1 -1
- data/doc/cxxapi/classPassenger_1_1SecurityException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1SecurityException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1Session-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1Session.html +2 -2
- data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1SpawnException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +2 -2
- data/doc/cxxapi/classPassenger_1_1SpawnManager.html +6 -18
- data/doc/cxxapi/classPassenger_1_1StandardSession-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1StandardSession.html +1 -1
- data/doc/cxxapi/classPassenger_1_1StaticString-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1StaticString.html +1 -1
- data/doc/cxxapi/classPassenger_1_1SystemException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1SystemException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1TimeRetrievalException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1TimeRetrievalException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1TimeoutException-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1TimeoutException.html +1 -1
- data/doc/cxxapi/classPassenger_1_1Uint16Reader-members.html +33 -0
- data/doc/cxxapi/classPassenger_1_1Uint16Reader.html +47 -0
- data/doc/cxxapi/classPassenger_1_1Uint32Reader-members.html +33 -0
- data/doc/cxxapi/classPassenger_1_1Uint32Reader.html +47 -0
- data/doc/cxxapi/classServer-members.html +1 -1
- data/doc/cxxapi/classServer.html +1 -1
- data/doc/cxxapi/classServerInstanceDirToucher-members.html +1 -1
- data/doc/cxxapi/classServerInstanceDirToucher.html +1 -1
- data/doc/cxxapi/classes.html +13 -10
- data/doc/cxxapi/definitions_8h-source.html +2 -1
- data/doc/cxxapi/doxygen.css +91 -0
- data/doc/cxxapi/files.html +16 -13
- data/doc/cxxapi/functions.html +32 -21
- data/doc/cxxapi/functions_enum.html +1 -1
- data/doc/cxxapi/functions_eval.html +1 -1
- data/doc/cxxapi/functions_func.html +32 -21
- data/doc/cxxapi/functions_vars.html +3 -1
- data/doc/cxxapi/graph_legend.html +20 -15
- data/doc/cxxapi/graph_legend.png +0 -0
- data/doc/cxxapi/group__Configuration.html +51 -64
- data/doc/cxxapi/group__Configuration.png +0 -0
- data/doc/cxxapi/group__Core.html +24 -26
- data/doc/cxxapi/group__Core.png +0 -0
- data/doc/cxxapi/group__Exceptions.html +1 -1
- data/doc/cxxapi/group__Hooks.html +17 -15
- data/doc/cxxapi/group__Hooks.png +0 -0
- data/doc/cxxapi/group__Support.html +11 -9
- data/doc/cxxapi/hierarchy.html +6 -1
- data/doc/cxxapi/index.html +10 -5
- data/doc/cxxapi/inherit__graph__10.map +1 -1
- data/doc/cxxapi/inherit__graph__10.md5 +1 -1
- data/doc/cxxapi/inherit__graph__10.png +0 -0
- data/doc/cxxapi/inherit__graph__11.map +1 -1
- data/doc/cxxapi/inherit__graph__11.md5 +1 -1
- data/doc/cxxapi/inherit__graph__11.png +0 -0
- data/doc/cxxapi/inherit__graph__12.map +1 -1
- data/doc/cxxapi/inherit__graph__12.md5 +1 -1
- data/doc/cxxapi/inherit__graph__12.png +0 -0
- data/doc/cxxapi/inherit__graph__13.map +1 -1
- data/doc/cxxapi/inherit__graph__13.md5 +1 -1
- data/doc/cxxapi/inherit__graph__13.png +0 -0
- data/doc/cxxapi/inherit__graph__14.map +1 -3
- data/doc/cxxapi/inherit__graph__14.md5 +1 -1
- data/doc/cxxapi/inherit__graph__14.png +0 -0
- data/doc/cxxapi/inherit__graph__15.map +1 -1
- data/doc/cxxapi/inherit__graph__15.md5 +1 -1
- data/doc/cxxapi/inherit__graph__15.png +0 -0
- data/doc/cxxapi/inherit__graph__16.map +3 -1
- data/doc/cxxapi/inherit__graph__16.md5 +1 -1
- data/doc/cxxapi/inherit__graph__16.png +0 -0
- data/doc/cxxapi/inherit__graph__17.map +1 -1
- data/doc/cxxapi/inherit__graph__17.md5 +1 -1
- data/doc/cxxapi/inherit__graph__17.png +0 -0
- data/doc/cxxapi/inherit__graph__18.map +1 -2
- data/doc/cxxapi/inherit__graph__18.md5 +1 -1
- data/doc/cxxapi/inherit__graph__18.png +0 -0
- data/doc/cxxapi/inherit__graph__19.map +1 -1
- data/doc/cxxapi/inherit__graph__19.md5 +1 -1
- data/doc/cxxapi/inherit__graph__19.png +0 -0
- data/doc/cxxapi/inherit__graph__20.map +2 -1
- data/doc/cxxapi/inherit__graph__20.md5 +1 -1
- data/doc/cxxapi/inherit__graph__20.png +0 -0
- data/doc/cxxapi/inherit__graph__21.map +1 -1
- data/doc/cxxapi/inherit__graph__21.md5 +1 -1
- data/doc/cxxapi/inherit__graph__21.png +0 -0
- data/doc/cxxapi/inherit__graph__22.map +1 -1
- data/doc/cxxapi/inherit__graph__22.md5 +1 -1
- data/doc/cxxapi/inherit__graph__22.png +0 -0
- data/doc/cxxapi/inherit__graph__23.map +1 -1
- data/doc/cxxapi/inherit__graph__23.md5 +1 -1
- data/doc/cxxapi/inherit__graph__23.png +0 -0
- data/doc/cxxapi/inherit__graph__24.map +1 -1
- data/doc/cxxapi/inherit__graph__24.md5 +1 -1
- data/doc/cxxapi/inherit__graph__24.png +0 -0
- data/doc/cxxapi/inherit__graph__25.map +1 -1
- data/doc/cxxapi/inherit__graph__25.md5 +1 -1
- data/doc/cxxapi/inherit__graph__25.png +0 -0
- data/doc/cxxapi/inherit__graph__26.map +1 -1
- data/doc/cxxapi/inherit__graph__26.md5 +1 -1
- data/doc/cxxapi/inherit__graph__26.png +0 -0
- data/doc/cxxapi/inherit__graph__27.map +1 -2
- data/doc/cxxapi/inherit__graph__27.md5 +1 -1
- data/doc/cxxapi/inherit__graph__27.png +0 -0
- data/doc/cxxapi/inherit__graph__28.map +1 -1
- data/doc/cxxapi/inherit__graph__28.md5 +1 -1
- data/doc/cxxapi/inherit__graph__28.png +0 -0
- data/doc/cxxapi/inherit__graph__29.map +1 -1
- data/doc/cxxapi/inherit__graph__29.md5 +1 -1
- data/doc/cxxapi/inherit__graph__29.png +0 -0
- data/doc/cxxapi/inherit__graph__30.map +2 -1
- data/doc/cxxapi/inherit__graph__30.md5 +1 -1
- data/doc/cxxapi/inherit__graph__30.png +0 -0
- data/doc/cxxapi/inherit__graph__31.map +1 -3
- data/doc/cxxapi/inherit__graph__31.md5 +1 -1
- data/doc/cxxapi/inherit__graph__31.png +0 -0
- data/doc/cxxapi/inherit__graph__32.map +1 -1
- data/doc/cxxapi/inherit__graph__32.md5 +1 -1
- data/doc/cxxapi/inherit__graph__32.png +0 -0
- data/doc/cxxapi/inherit__graph__33.map +1 -1
- data/doc/cxxapi/inherit__graph__33.md5 +1 -1
- data/doc/cxxapi/inherit__graph__33.png +0 -0
- data/doc/cxxapi/inherit__graph__34.map +3 -1
- data/doc/cxxapi/inherit__graph__34.md5 +1 -1
- data/doc/cxxapi/inherit__graph__34.png +0 -0
- data/doc/cxxapi/inherit__graph__35.map +1 -1
- data/doc/cxxapi/inherit__graph__35.md5 +1 -1
- data/doc/cxxapi/inherit__graph__35.png +0 -0
- data/doc/cxxapi/inherit__graph__36.map +1 -1
- data/doc/cxxapi/inherit__graph__36.md5 +1 -1
- data/doc/cxxapi/inherit__graph__36.png +0 -0
- data/doc/cxxapi/inherit__graph__37.map +1 -0
- data/doc/cxxapi/inherit__graph__37.md5 +1 -0
- data/doc/cxxapi/inherit__graph__37.png +0 -0
- data/doc/cxxapi/inherit__graph__38.map +1 -0
- data/doc/cxxapi/inherit__graph__38.md5 +1 -0
- data/doc/cxxapi/inherit__graph__38.png +0 -0
- data/doc/cxxapi/inherit__graph__39.map +1 -0
- data/doc/cxxapi/inherit__graph__39.md5 +1 -0
- data/doc/cxxapi/inherit__graph__39.png +0 -0
- data/doc/cxxapi/inherit__graph__5.map +1 -1
- data/doc/cxxapi/inherit__graph__5.md5 +1 -1
- data/doc/cxxapi/inherit__graph__5.png +0 -0
- data/doc/cxxapi/inherit__graph__6.map +1 -1
- data/doc/cxxapi/inherit__graph__6.md5 +1 -1
- data/doc/cxxapi/inherit__graph__6.png +0 -0
- data/doc/cxxapi/inherit__graph__7.map +1 -1
- data/doc/cxxapi/inherit__graph__7.md5 +1 -1
- data/doc/cxxapi/inherit__graph__7.png +0 -0
- data/doc/cxxapi/inherit__graph__8.map +1 -1
- data/doc/cxxapi/inherit__graph__8.md5 +1 -1
- data/doc/cxxapi/inherit__graph__8.png +0 -0
- data/doc/cxxapi/inherit__graph__9.map +1 -1
- data/doc/cxxapi/inherit__graph__9.md5 +1 -1
- data/doc/cxxapi/inherit__graph__9.png +0 -0
- data/doc/cxxapi/inherits.html +46 -31
- data/doc/cxxapi/main.html +12 -11
- data/doc/cxxapi/modules.html +16 -13
- data/doc/cxxapi/namespacePassenger.html +82 -5
- data/doc/cxxapi/namespacemembers.html +5 -3
- data/doc/cxxapi/namespacemembers_enum.html +1 -1
- data/doc/cxxapi/namespacemembers_eval.html +1 -1
- data/doc/cxxapi/namespacemembers_func.html +5 -3
- data/doc/cxxapi/namespacemembers_type.html +1 -1
- data/doc/cxxapi/namespaces.html +2 -2
- data/doc/cxxapi/nginx_2Configuration_8h-source.html +43 -42
- data/doc/cxxapi/ngx__http__passenger__module_8h-source.html +1 -1
- data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +1 -1
- data/doc/cxxapi/structPassenger_1_1AnythingToString.html +1 -1
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01StaticString_01_4_01_4-members.html +33 -0
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01StaticString_01_4_01_4.html +52 -0
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +1 -1
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +1 -1
- data/doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard-members.html +1 -1
- data/doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard.html +1 -1
- data/doc/cxxapi/structPassenger_1_1PoolOptions-members.html +3 -2
- data/doc/cxxapi/structPassenger_1_1PoolOptions.html +25 -5
- data/doc/cxxapi/structPassenger_1_1StaticString_1_1Hash-members.html +1 -1
- data/doc/cxxapi/structPassenger_1_1StaticString_1_1Hash.html +1 -1
- data/doc/cxxapi/tabs.css +1 -1
- data/doc/cxxapi/tree.html +20 -17
- data/doc/users_guide_snippets/tips.txt +28 -0
- data/ext/apache2/Hooks.cpp +19 -2
- data/ext/common/Utils.cpp +15 -4
- data/ext/common/Version.h +1 -1
- data/ext/nginx/StaticContentHandler.c +6 -3
- data/ext/phusion_passenger/native_support.c +25 -0
- data/lib/phusion_passenger/abstract_request_handler.rb +1 -0
- data/lib/phusion_passenger/constants.rb +1 -1
- data/lib/phusion_passenger/events.rb +3 -0
- data/lib/phusion_passenger/platform_info.rb +2 -1
- data/lib/phusion_passenger/rack/application_spawner.rb +2 -0
- data/lib/phusion_passenger/railz/application_spawner.rb +8 -0
- data/lib/phusion_passenger/utils.rb +69 -9
- data/lib/phusion_passenger/utils/rewindable_input.rb +10 -6
- metadata +55 -17
@@ -24,7 +24,7 @@
|
|
24
24
|
module PhusionPassenger
|
25
25
|
# Phusion Passenger version number.
|
26
26
|
# Don't forget to edit ext/common/Version.h too.
|
27
|
-
VERSION_STRING = '2.2.
|
27
|
+
VERSION_STRING = '2.2.12'
|
28
28
|
|
29
29
|
DEFAULT_FRAMEWORK_SPAWNER_MAX_IDLE_TIME = 30 * 60
|
30
30
|
DEFAULT_APP_SPAWNER_MAX_IDLE_TIME = 10 * 60
|
@@ -24,6 +24,7 @@
|
|
24
24
|
module PhusionPassenger
|
25
25
|
@@event_starting_worker_process = []
|
26
26
|
@@event_stopping_worker_process = []
|
27
|
+
@@after_installing_signal_handlers = []
|
27
28
|
|
28
29
|
def self.on_event(name, &block)
|
29
30
|
callback_list_for_event(name) << block
|
@@ -42,6 +43,8 @@ private
|
|
42
43
|
@@event_starting_worker_process
|
43
44
|
when :stopping_worker_process
|
44
45
|
@@event_stopping_worker_process
|
46
|
+
when :after_installing_signal_handlers
|
47
|
+
@@after_installing_signal_handlers
|
45
48
|
else
|
46
49
|
raise ArgumentError, "Unknown event name '#{name}'"
|
47
50
|
end
|
@@ -346,9 +346,10 @@ public
|
|
346
346
|
flags << '-DBOOST_HAS_STDINT_H -D_GLIBCPP__PTHREADS'
|
347
347
|
elsif RUBY_PLATFORM =~ /aix/
|
348
348
|
flags << '-DOXT_DISABLE_BACKTRACES'
|
349
|
-
elsif RUBY_PLATFORM =~ /(sparc-linux|arm-linux|sh4-linux)/
|
349
|
+
elsif RUBY_PLATFORM =~ /(sparc-linux|arm-linux|^arm.*-linux|sh4-linux)/
|
350
350
|
# http://code.google.com/p/phusion-passenger/issues/detail?id=200
|
351
351
|
# http://groups.google.com/group/phusion-passenger/t/6b904a962ee28e5c
|
352
|
+
# http://groups.google.com/group/phusion-passenger/browse_thread/thread/aad4bd9d8d200561
|
352
353
|
flags << '-DBOOST_SP_USE_PTHREADS'
|
353
354
|
end
|
354
355
|
return flags.compact.join(" ").strip
|
@@ -86,6 +86,7 @@ private
|
|
86
86
|
app = nil
|
87
87
|
success = report_app_init_status(channel) do
|
88
88
|
ENV['RACK_ENV'] = options["environment"]
|
89
|
+
ENV['RAILS_ENV'] = options["environment"]
|
89
90
|
if options["base_uri"] && options["base_uri"] != "/"
|
90
91
|
ENV['RACK_BASE_URI'] = options["base_uri"]
|
91
92
|
ENV['RAILS_RELATIVE_URL_ROOT'] = options["base_uri"]
|
@@ -101,6 +102,7 @@ private
|
|
101
102
|
# that have been set now (e.g. $HOME, $GEM_HOME, etc) and that
|
102
103
|
# it is able to detect newly installed gems.
|
103
104
|
Gem.clear_paths
|
105
|
+
setup_bundler_support
|
104
106
|
app = load_rack_app
|
105
107
|
end
|
106
108
|
|
@@ -161,6 +161,7 @@ class ApplicationSpawner < AbstractServer
|
|
161
161
|
channel = MessageChannel.new(b)
|
162
162
|
success = report_app_init_status(channel) do
|
163
163
|
ENV['RAILS_ENV'] = @environment
|
164
|
+
ENV['RACK_ENV'] = @environment
|
164
165
|
ENV['RAILS_RELATIVE_URL_ROOT'] = @base_uri
|
165
166
|
Dir.chdir(@app_root)
|
166
167
|
if @encoded_environment_variables
|
@@ -173,6 +174,7 @@ class ApplicationSpawner < AbstractServer
|
|
173
174
|
# that have been set now (e.g. $HOME, $GEM_HOME, etc) and that
|
174
175
|
# it is able to detect newly installed gems.
|
175
176
|
Gem.clear_paths
|
177
|
+
setup_bundler_support
|
176
178
|
|
177
179
|
require File.expand_path('config/environment')
|
178
180
|
require 'dispatcher'
|
@@ -237,6 +239,7 @@ protected
|
|
237
239
|
report_app_init_status(client) do
|
238
240
|
$0 = "Passenger ApplicationSpawner: #{@app_root}"
|
239
241
|
ENV['RAILS_ENV'] = @environment
|
242
|
+
ENV['RACK_ENV'] = @environment
|
240
243
|
ENV['RAILS_RELATIVE_URL_ROOT'] = @base_uri
|
241
244
|
if defined?(RAILS_ENV)
|
242
245
|
Object.send(:remove_const, :RAILS_ENV)
|
@@ -249,6 +252,11 @@ protected
|
|
249
252
|
if @lower_privilege
|
250
253
|
lower_privilege('config/environment.rb', @lowest_user)
|
251
254
|
end
|
255
|
+
# Make sure RubyGems uses any new environment variable values
|
256
|
+
# that have been set now (e.g. $HOME, $GEM_HOME, etc) and that
|
257
|
+
# it is able to detect newly installed gems.
|
258
|
+
Gem.clear_paths
|
259
|
+
setup_bundler_support
|
252
260
|
preload_application
|
253
261
|
end
|
254
262
|
end
|
@@ -32,6 +32,7 @@ require 'etc'
|
|
32
32
|
require 'fcntl'
|
33
33
|
require 'tempfile'
|
34
34
|
require 'stringio'
|
35
|
+
require 'phusion_passenger/packaging'
|
35
36
|
require 'phusion_passenger/exceptions'
|
36
37
|
if !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby"
|
37
38
|
require 'phusion_passenger/native_support'
|
@@ -163,6 +164,73 @@ protected
|
|
163
164
|
end
|
164
165
|
end
|
165
166
|
|
167
|
+
def setup_bundler_support(options = {})
|
168
|
+
# Rack::ApplicationSpawner depends on the 'rack' library, but the app
|
169
|
+
# might want us to use a bundled version instead of a
|
170
|
+
# gem/apt-get/yum/whatever-installed version. Therefore we must setup
|
171
|
+
# the correct load paths before requiring 'rack'.
|
172
|
+
#
|
173
|
+
# The most popular tool for bundling dependencies is Bundler. Bundler
|
174
|
+
# works as follows:
|
175
|
+
# - If the bundle is locked then a file .bundle/environment.rb exists
|
176
|
+
# which will setup the load paths.
|
177
|
+
# - If the bundle is not locked then the load paths must be set up by
|
178
|
+
# calling Bundler.setup.
|
179
|
+
# - Rails 3's boot.rb automatically loads .bundle/environment.rb or
|
180
|
+
# calls Bundler.setup if that's not available.
|
181
|
+
# - Other Rack apps might not have a boot.rb but we still want to setup
|
182
|
+
# Bundler.
|
183
|
+
# - Some Rails 2 apps might have explicitly added Bundler support.
|
184
|
+
# These apps call Bundler.setup in their preinitializer.rb.
|
185
|
+
#
|
186
|
+
# So the strategy is as follows:
|
187
|
+
|
188
|
+
# Our strategy might be completely unsuitable for the app or the
|
189
|
+
# developer is using something other than Bundler (or possibly an
|
190
|
+
# older version of Bundler which is API incompatible with the latest
|
191
|
+
# version), so we let the user manually specify a load path setup file.
|
192
|
+
if options["load_path_setup_file"]
|
193
|
+
require File.expand(options["load_path_setup_file"])
|
194
|
+
|
195
|
+
# The app developer may also override our strategy with this magic file.
|
196
|
+
elsif File.exist?('config/setup_load_paths.rb')
|
197
|
+
require File.expand('config/setup_load_paths')
|
198
|
+
|
199
|
+
# If the Bundler lock environment file exists then load that. If it
|
200
|
+
# exists then there's a 99.9% chance that loading it is the correct
|
201
|
+
# thing to do.
|
202
|
+
elsif File.exist?('.bundle/environment.rb')
|
203
|
+
require File.expand_path('.bundle/environment')
|
204
|
+
|
205
|
+
# If the Bundler environment file doesn't exist then there are two
|
206
|
+
# possibilities:
|
207
|
+
# 1. Bundler is not used, in which case we don't have to do anything.
|
208
|
+
# 2. Bundler *is* used, but the gems are not locked and we're supposed
|
209
|
+
# to call Bundler.setup.
|
210
|
+
#
|
211
|
+
# The existence of Gemfile indicates whether (2) is true:
|
212
|
+
elsif File.exist?('Gemfile')
|
213
|
+
# In case of Rails 3, config/boot.rb already calls Bundler.setup.
|
214
|
+
# However older versions of Rails may not so loading boot.rb might
|
215
|
+
# not be the correct thing to do. To be on the safe side we
|
216
|
+
# call Bundler.setup ourselves; calling Bundler.setup twice is
|
217
|
+
# harmless. If this isn't the correct thing to do after all then
|
218
|
+
# there's always the load_path_setup_file option and
|
219
|
+
# setup_load_paths.rb.
|
220
|
+
require 'rubygems'
|
221
|
+
require 'bundler'
|
222
|
+
Bundler.setup
|
223
|
+
end
|
224
|
+
|
225
|
+
# Bundler might remove Phusion Passenger from the load path in its zealous
|
226
|
+
# attempt to un-require RubyGems, so here we put Phusion Passenger back
|
227
|
+
# into the load path.
|
228
|
+
if $LOAD_PATH.first != LIBDIR
|
229
|
+
$LOAD_PATH.unshift(LIBDIR)
|
230
|
+
$LOAD_PATH.uniq!
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
166
234
|
# Fork a new process and run the given block inside the child process, just like
|
167
235
|
# fork(). Unlike fork(), this method is safe, i.e. there's no way for the child
|
168
236
|
# process to escape the block. Any uncaught exceptions in the child process will
|
@@ -371,15 +439,7 @@ protected
|
|
371
439
|
if uid == 0
|
372
440
|
return false
|
373
441
|
else
|
374
|
-
|
375
|
-
# all kinds of stupid reasons. So we ignore any errors
|
376
|
-
# raised by initgroups.
|
377
|
-
begin
|
378
|
-
Process.groups = Process.initgroups(username, gid)
|
379
|
-
rescue
|
380
|
-
end
|
381
|
-
Process::Sys.setgid(gid)
|
382
|
-
Process::Sys.setuid(uid)
|
442
|
+
NativeSupport.switch_user(username, uid, gid)
|
383
443
|
ENV['HOME'] = pw.dir
|
384
444
|
return true
|
385
445
|
end
|
@@ -64,12 +64,16 @@ module Utils
|
|
64
64
|
|
65
65
|
private
|
66
66
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
67
|
+
if RUBY_VERSION < '1.9.0'
|
68
|
+
# Many Ruby 1.8's tempfile libraries have a bug that can cause
|
69
|
+
# the #close method to raise an exception. Subclass it and fix
|
70
|
+
# it.
|
71
|
+
class Tempfile < ::Tempfile
|
72
|
+
def _close
|
73
|
+
@tmpfile.close if @tmpfile
|
74
|
+
@data[1] = nil if @data
|
75
|
+
@tmpfile = nil
|
76
|
+
end
|
73
77
|
end
|
74
78
|
end
|
75
79
|
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: passenger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 2
|
7
|
+
- 2
|
8
|
+
- 12
|
9
|
+
version: 2.2.12
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Phusion - http://www.phusion.nl/
|
@@ -9,39 +14,49 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-05-31 00:00:00 +02:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: rake
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 8
|
30
|
+
- 1
|
23
31
|
version: 0.8.1
|
24
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
25
34
|
- !ruby/object:Gem::Dependency
|
26
35
|
name: fastthread
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
38
|
requirements:
|
31
39
|
- - ">="
|
32
40
|
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 1
|
43
|
+
- 0
|
44
|
+
- 1
|
33
45
|
version: 1.0.1
|
34
|
-
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
35
48
|
- !ruby/object:Gem::Dependency
|
36
49
|
name: rack
|
37
|
-
|
38
|
-
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
52
|
requirements:
|
41
53
|
- - ">="
|
42
54
|
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 0
|
43
57
|
version: "0"
|
44
|
-
|
58
|
+
type: :runtime
|
59
|
+
version_requirements: *id003
|
45
60
|
description: Passenger is an Apache module for Ruby on Rails support.
|
46
61
|
email: info@phusion.nl
|
47
62
|
executables:
|
@@ -167,6 +182,8 @@ files:
|
|
167
182
|
- doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.png
|
168
183
|
- doc/cxxapi/classPassenger_1_1ArgumentException-members.html
|
169
184
|
- doc/cxxapi/classPassenger_1_1ArgumentException.html
|
185
|
+
- doc/cxxapi/classPassenger_1_1ArrayReader-members.html
|
186
|
+
- doc/cxxapi/classPassenger_1_1ArrayReader.html
|
170
187
|
- doc/cxxapi/classPassenger_1_1BacktracesServer-members.html
|
171
188
|
- doc/cxxapi/classPassenger_1_1BacktracesServer.html
|
172
189
|
- doc/cxxapi/classPassenger_1_1BacktracesServer__inherit__graph.map
|
@@ -235,6 +252,8 @@ files:
|
|
235
252
|
- doc/cxxapi/classPassenger_1_1RandomGenerator.html
|
236
253
|
- doc/cxxapi/classPassenger_1_1RuntimeException-members.html
|
237
254
|
- doc/cxxapi/classPassenger_1_1RuntimeException.html
|
255
|
+
- doc/cxxapi/classPassenger_1_1ScalarReader-members.html
|
256
|
+
- doc/cxxapi/classPassenger_1_1ScalarReader.html
|
238
257
|
- doc/cxxapi/classPassenger_1_1ScgiRequestParser-members.html
|
239
258
|
- doc/cxxapi/classPassenger_1_1ScgiRequestParser.html
|
240
259
|
- doc/cxxapi/classPassenger_1_1SecurityException-members.html
|
@@ -274,6 +293,10 @@ files:
|
|
274
293
|
- doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.map
|
275
294
|
- doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.md5
|
276
295
|
- doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.png
|
296
|
+
- doc/cxxapi/classPassenger_1_1Uint16Reader-members.html
|
297
|
+
- doc/cxxapi/classPassenger_1_1Uint16Reader.html
|
298
|
+
- doc/cxxapi/classPassenger_1_1Uint32Reader-members.html
|
299
|
+
- doc/cxxapi/classPassenger_1_1Uint32Reader.html
|
277
300
|
- doc/cxxapi/classServer-members.html
|
278
301
|
- doc/cxxapi/classServer.html
|
279
302
|
- doc/cxxapi/classServerInstanceDirToucher-members.html
|
@@ -285,6 +308,7 @@ files:
|
|
285
308
|
- doc/cxxapi/DirectoryMapper_8h-source.html
|
286
309
|
- doc/cxxapi/doxygen.css
|
287
310
|
- doc/cxxapi/doxygen.png
|
311
|
+
- doc/cxxapi/EventedServer_8h-source.html
|
288
312
|
- doc/cxxapi/Exceptions_8h-source.html
|
289
313
|
- doc/cxxapi/FileChangeChecker_8h-source.html
|
290
314
|
- doc/cxxapi/FileDescriptor_8h-source.html
|
@@ -414,6 +438,15 @@ files:
|
|
414
438
|
- doc/cxxapi/inherit__graph__36.map
|
415
439
|
- doc/cxxapi/inherit__graph__36.md5
|
416
440
|
- doc/cxxapi/inherit__graph__36.png
|
441
|
+
- doc/cxxapi/inherit__graph__37.map
|
442
|
+
- doc/cxxapi/inherit__graph__37.md5
|
443
|
+
- doc/cxxapi/inherit__graph__37.png
|
444
|
+
- doc/cxxapi/inherit__graph__38.map
|
445
|
+
- doc/cxxapi/inherit__graph__38.md5
|
446
|
+
- doc/cxxapi/inherit__graph__38.png
|
447
|
+
- doc/cxxapi/inherit__graph__39.map
|
448
|
+
- doc/cxxapi/inherit__graph__39.md5
|
449
|
+
- doc/cxxapi/inherit__graph__39.png
|
417
450
|
- doc/cxxapi/inherit__graph__4.map
|
418
451
|
- doc/cxxapi/inherit__graph__4.md5
|
419
452
|
- doc/cxxapi/inherit__graph__4.png
|
@@ -439,6 +472,7 @@ files:
|
|
439
472
|
- doc/cxxapi/md5_8h-source.html
|
440
473
|
- doc/cxxapi/MessageChannel_8h-source.html
|
441
474
|
- doc/cxxapi/MessageClient_8h-source.html
|
475
|
+
- doc/cxxapi/MessageReadersWriters_8h-source.html
|
442
476
|
- doc/cxxapi/MessageServer_8h-source.html
|
443
477
|
- doc/cxxapi/modules.html
|
444
478
|
- doc/cxxapi/namespacemembers.html
|
@@ -463,6 +497,8 @@ files:
|
|
463
497
|
- doc/cxxapi/StringListCreator_8h-source.html
|
464
498
|
- doc/cxxapi/structPassenger_1_1AnythingToString-members.html
|
465
499
|
- doc/cxxapi/structPassenger_1_1AnythingToString.html
|
500
|
+
- doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01StaticString_01_4_01_4-members.html
|
501
|
+
- doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01StaticString_01_4_01_4.html
|
466
502
|
- doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html
|
467
503
|
- doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html
|
468
504
|
- doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard-members.html
|
@@ -1336,19 +1372,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1336
1372
|
requirements:
|
1337
1373
|
- - ">="
|
1338
1374
|
- !ruby/object:Gem::Version
|
1375
|
+
segments:
|
1376
|
+
- 0
|
1339
1377
|
version: "0"
|
1340
|
-
version:
|
1341
1378
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1342
1379
|
requirements:
|
1343
1380
|
- - ">="
|
1344
1381
|
- !ruby/object:Gem::Version
|
1382
|
+
segments:
|
1383
|
+
- 0
|
1345
1384
|
version: "0"
|
1346
|
-
version:
|
1347
1385
|
requirements:
|
1348
1386
|
- fastthread
|
1349
1387
|
- Apache 2 with development headers
|
1350
1388
|
rubyforge_project: passenger
|
1351
|
-
rubygems_version: 1.3.
|
1389
|
+
rubygems_version: 1.3.6
|
1352
1390
|
signing_key:
|
1353
1391
|
specification_version: 3
|
1354
1392
|
summary: Apache module for Ruby on Rails support.
|