passenger 2.1.3 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- data/DEVELOPERS.TXT +2 -0
- data/INSTALL +3 -1
- data/LICENSE +19 -355
- data/NEWS +3 -0
- data/README +11 -4
- data/Rakefile +435 -236
- data/bin/passenger-config +20 -14
- data/bin/passenger-install-apache2-module +67 -201
- data/bin/passenger-install-nginx-module +477 -0
- data/bin/passenger-make-enterprisey +17 -12
- data/bin/passenger-memory-stats +33 -23
- data/bin/passenger-spawn-server +17 -12
- data/bin/passenger-status +18 -13
- data/bin/passenger-stress-test +17 -12
- data/doc/{Users guide.html → Users guide Apache.html } +79 -61
- data/doc/{Users guide.txt → Users guide Apache.txt } +43 -939
- data/doc/Users guide Nginx.html +2276 -0
- data/doc/Users guide Nginx.txt +776 -0
- data/doc/cxxapi/ApplicationPoolServer_8h-source.html +9 -4
- data/doc/cxxapi/ApplicationPool_8h-source.html +9 -4
- data/doc/cxxapi/Application_8h-source.html +26 -21
- data/doc/cxxapi/Bucket_8h-source.html +54 -44
- data/doc/cxxapi/CachedFileStat_8h-source.html +9 -4
- data/doc/cxxapi/Configuration_8h-source.html +357 -339
- data/doc/cxxapi/DirectoryMapper_8h-source.html +294 -280
- data/doc/cxxapi/DummySpawnManager_8h-source.html +9 -4
- data/doc/cxxapi/Exceptions_8h-source.html +9 -4
- data/doc/cxxapi/FileChecker_8h-source.html +9 -4
- data/doc/cxxapi/Hooks_8h-source.html +50 -40
- data/doc/cxxapi/Logging_8h-source.html +9 -4
- data/doc/cxxapi/MessageChannel_8h-source.html +20 -15
- data/doc/cxxapi/PoolOptions_8h-source.html +10 -5
- data/doc/cxxapi/SpawnManager_8h-source.html +9 -4
- data/doc/cxxapi/StandardApplicationPool_8h-source.html +10 -5
- data/doc/cxxapi/SystemTime_8h-source.html +9 -4
- data/doc/cxxapi/Utils_8h-source.html +242 -214
- data/doc/cxxapi/annotated.html +4 -28
- data/doc/cxxapi/classClient-members.html +4 -4
- data/doc/cxxapi/classClient.html +14 -11
- data/doc/cxxapi/classHooks-members.html +4 -5
- data/doc/cxxapi/classHooks.html +26 -24
- data/doc/cxxapi/classPassenger_1_1Application-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1Application.html +40 -37
- data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +95 -92
- data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +26 -23
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +17 -17
- data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +139 -136
- data/doc/cxxapi/classPassenger_1_1BufferedUpload-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1BufferedUpload.html +13 -10
- data/doc/cxxapi/classPassenger_1_1BusyException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1BusyException.html +11 -8
- data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +11 -8
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +4 -5
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +45 -43
- data/doc/cxxapi/classPassenger_1_1DummySpawnManager-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +13 -10
- data/doc/cxxapi/classPassenger_1_1FileChecker-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1FileChecker.html +22 -19
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +12 -9
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1FileSystemException.html +14 -11
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1IOException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1IOException.html +12 -9
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1MessageChannel.html +228 -225
- data/doc/cxxapi/classPassenger_1_1RuntimeException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1RuntimeException.html +11 -8
- data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SpawnException.html +14 -11
- data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SpawnManager.html +50 -47
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +73 -70
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1SystemException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SystemException.html +17 -14
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1SystemTime-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SystemTime.html +14 -11
- data/doc/cxxapi/classes.html +35 -0
- data/doc/cxxapi/definitions_8h-source.html +9 -4
- data/doc/cxxapi/doxygen.css +311 -303
- data/doc/cxxapi/files.html +9 -18
- data/doc/cxxapi/functions.html +5 -224
- data/doc/cxxapi/functions_func.html +5 -185
- data/doc/cxxapi/functions_type.html +4 -4
- data/doc/cxxapi/functions_vars.html +4 -4
- data/doc/cxxapi/graph_legend.dot +19 -19
- data/doc/cxxapi/graph_legend.html +5 -5
- data/doc/cxxapi/graph_legend.png +0 -0
- data/doc/cxxapi/group__Configuration.html +11 -13
- data/doc/cxxapi/group__Configuration.png +0 -0
- data/doc/cxxapi/group__Core.html +10 -12
- data/doc/cxxapi/group__Core.png +0 -0
- data/doc/cxxapi/group__Exceptions.html +5 -7
- data/doc/cxxapi/group__Hooks.html +5 -7
- data/doc/cxxapi/group__Hooks.png +0 -0
- data/doc/cxxapi/group__Support.html +5 -624
- data/doc/cxxapi/hierarchy.html +6 -6
- data/doc/cxxapi/inherit__graph__0.map +1 -1
- data/doc/cxxapi/inherit__graph__0.md5 +1 -1
- data/doc/cxxapi/inherit__graph__0.png +0 -0
- data/doc/cxxapi/inherit__graph__1.map +1 -1
- data/doc/cxxapi/inherit__graph__1.md5 +1 -1
- data/doc/cxxapi/inherit__graph__1.png +0 -0
- 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 -2
- 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 +2 -1
- 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 +1 -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 -1
- 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__2.map +1 -1
- data/doc/cxxapi/inherit__graph__2.md5 +1 -1
- data/doc/cxxapi/inherit__graph__2.png +0 -0
- data/doc/cxxapi/inherit__graph__20.map +2 -2
- 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__3.map +1 -1
- data/doc/cxxapi/inherit__graph__3.md5 +1 -1
- data/doc/cxxapi/inherit__graph__3.png +0 -0
- data/doc/cxxapi/inherit__graph__4.map +1 -1
- data/doc/cxxapi/inherit__graph__4.md5 +1 -1
- data/doc/cxxapi/inherit__graph__4.png +0 -0
- data/doc/cxxapi/inherit__graph__5.map +1 -2
- 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 +2 -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 +41 -41
- data/doc/cxxapi/main.html +4 -4
- data/doc/cxxapi/modules.html +4 -5
- data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +4 -4
- data/doc/cxxapi/structPassenger_1_1AnythingToString.html +13 -10
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +5 -5
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +16 -13
- data/doc/cxxapi/structPassenger_1_1PoolOptions-members.html +4 -4
- data/doc/cxxapi/structPassenger_1_1PoolOptions.html +63 -60
- data/doc/cxxapi/tabs.css +5 -2
- data/doc/cxxapi/tree.html +7 -81
- data/doc/rdoc/classes/ConditionVariable.html +59 -59
- data/doc/rdoc/classes/Exception.html +11 -11
- data/doc/rdoc/classes/GC.html +4 -4
- data/doc/rdoc/classes/IO.html +14 -14
- data/doc/rdoc/classes/PhusionPassenger.html +75 -20
- data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +153 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +125 -130
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +236 -236
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +213 -213
- data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +28 -28
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +91 -75
- data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +10 -10
- data/doc/rdoc/classes/PhusionPassenger/Application.html +64 -64
- data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +34 -34
- data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +13 -13
- data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +30 -30
- data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +10 -10
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +136 -136
- data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +24 -24
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +42 -42
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +55 -53
- data/doc/rdoc/classes/PhusionPassenger/Railz.html +1 -1
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +25 -30
- data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +23 -23
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +116 -117
- data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +22 -22
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +118 -124
- data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +10 -10
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +354 -354
- data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +9 -9
- data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +37 -37
- data/doc/rdoc/classes/PlatformInfo.html +282 -261
- data/doc/rdoc/classes/RakeExtensions.html +7 -7
- data/doc/rdoc/classes/Signal.html +26 -26
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/DEVELOPERS_TXT.html +6 -1
- data/doc/rdoc/files/README.html +15 -6
- data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +129 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +20 -13
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +31 -1
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +31 -1
- data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +21 -12
- data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +22 -12
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +21 -12
- data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +21 -12
- data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +27 -21
- data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +21 -12
- data/doc/rdoc/files/misc/rake/extensions_rb.html +21 -12
- data/doc/rdoc/fr_class_index.html +1 -0
- data/doc/rdoc/fr_file_index.html +2 -0
- data/doc/rdoc/fr_method_index.html +116 -112
- data/doc/users_guide_snippets/analysis_and_system_maintenance_tools.txt +144 -0
- data/doc/users_guide_snippets/appendix_a_about.txt +13 -0
- data/doc/users_guide_snippets/appendix_b_terminology.txt +63 -0
- data/doc/users_guide_snippets/appendix_c_spawning_methods.txt +304 -0
- data/doc/users_guide_snippets/global_queueing_explained.txt +78 -0
- data/doc/users_guide_snippets/rackup_specifications.txt +75 -0
- data/doc/users_guide_snippets/rails_spawn_method.txt +48 -0
- data/doc/users_guide_snippets/tips.txt +173 -0
- data/ext/apache2/Bucket.cpp +17 -12
- data/ext/apache2/Bucket.h +17 -12
- data/ext/apache2/Configuration.cpp +17 -12
- data/ext/apache2/Configuration.h +27 -14
- data/ext/apache2/DirectoryMapper.h +21 -12
- data/ext/apache2/Hooks.cpp +67 -21
- data/ext/apache2/Hooks.h +17 -12
- data/ext/apache2/mod_passenger.c +17 -12
- data/ext/{apache2 → common}/Application.h +19 -14
- data/ext/{apache2 → common}/ApplicationPool.h +17 -12
- data/ext/{apache2 → common}/ApplicationPoolServer.h +18 -72
- data/ext/{apache2 → common}/ApplicationPoolServerExecutable.cpp +45 -104
- data/ext/common/ApplicationPoolStatusReporter.h +212 -0
- data/ext/{apache2 → common}/CachedFileStat.cpp +17 -12
- data/ext/{apache2 → common}/CachedFileStat.h +17 -12
- data/ext/{apache2 → common}/DummySpawnManager.h +17 -12
- data/ext/{apache2 → common}/Exceptions.h +17 -12
- data/ext/{apache2 → common}/FileChecker.h +17 -12
- data/ext/common/Logging.cpp +65 -0
- data/ext/{apache2 → common}/Logging.h +17 -12
- data/ext/{apache2 → common}/MessageChannel.h +17 -12
- data/ext/{apache2 → common}/PoolOptions.h +17 -12
- data/ext/{apache2 → common}/SpawnManager.h +17 -12
- data/ext/{apache2 → common}/StandardApplicationPool.h +17 -12
- data/ext/common/StaticString.h +147 -0
- data/ext/common/SystemTime.cpp +33 -0
- data/ext/{apache2 → common}/SystemTime.h +17 -12
- data/ext/{apache2 → common}/Utils.cpp +69 -12
- data/ext/{apache2 → common}/Utils.h +41 -12
- data/ext/nginx/Configuration.c +1091 -0
- data/ext/nginx/Configuration.h +71 -0
- data/ext/nginx/ContentHandler.c +1154 -0
- data/ext/nginx/ContentHandler.h +64 -0
- data/ext/nginx/HelperServer.cpp +857 -0
- data/ext/nginx/HttpStatusExtractor.h +161 -0
- data/ext/nginx/ScgiRequestParser.h +317 -0
- data/ext/nginx/StaticContentHandler.c +222 -0
- data/ext/nginx/StaticContentHandler.h +37 -0
- data/ext/nginx/config +41 -0
- data/ext/nginx/ngx_http_passenger_module.c +572 -0
- data/ext/nginx/ngx_http_passenger_module.h +72 -0
- data/ext/oxt/backtrace.cpp +8 -1
- data/ext/oxt/system_calls.cpp +40 -0
- data/ext/oxt/system_calls.hpp +14 -7
- data/ext/phusion_passenger/extconf.rb +17 -12
- data/ext/phusion_passenger/native_support.c +19 -12
- data/lib/phusion_passenger/abstract_installer.rb +196 -0
- data/lib/phusion_passenger/abstract_request_handler.rb +19 -24
- data/lib/phusion_passenger/abstract_server.rb +17 -12
- data/lib/phusion_passenger/abstract_server_collection.rb +17 -12
- data/lib/phusion_passenger/admin_tools.rb +23 -0
- data/lib/phusion_passenger/admin_tools/control_process.rb +39 -13
- data/lib/phusion_passenger/application.rb +17 -12
- data/lib/phusion_passenger/console_text_template.rb +17 -12
- data/lib/phusion_passenger/constants.rb +22 -11
- data/lib/phusion_passenger/dependencies.rb +47 -12
- data/lib/phusion_passenger/events.rb +17 -12
- data/lib/phusion_passenger/exceptions.rb +17 -12
- data/lib/phusion_passenger/html_template.rb +17 -12
- data/lib/phusion_passenger/message_channel.rb +17 -12
- data/lib/phusion_passenger/packaging.rb +39 -0
- data/lib/phusion_passenger/platform_info.rb +48 -22
- data/lib/phusion_passenger/rack/application_spawner.rb +22 -11
- data/lib/phusion_passenger/rack/request_handler.rb +21 -12
- data/lib/phusion_passenger/railz/application_spawner.rb +23 -23
- data/lib/phusion_passenger/railz/framework_spawner.rb +18 -14
- data/lib/phusion_passenger/railz/request_handler.rb +18 -11
- data/lib/phusion_passenger/simple_benchmarking.rb +17 -12
- data/lib/phusion_passenger/spawn_manager.rb +17 -20
- data/lib/phusion_passenger/templates/{apache_must_be_compiled_with_compatible_mpm.txt.erb → apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{apache2_config_snippets.txt.erb → apache2/config_snippets.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{deployment_example.txt.erb → apache2/deployment_example.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{no_write_permission_to_passenger_root.txt.erb → apache2/no_write_permission_to_passenger_root.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{possible_solutions_for_compilation_and_installation_problems.txt.erb → apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{run_installer_as_root.txt.erb → apache2/run_installer_as_root.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{welcome.txt.erb → apache2/welcome.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/nginx/ask_for_extra_configure_flags.txt.erb +8 -0
- data/lib/phusion_passenger/templates/nginx/cannot_write_to_dir.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/config_snippets.txt.erb +17 -0
- data/lib/phusion_passenger/templates/nginx/config_snippets_inserted.txt.erb +20 -0
- data/lib/phusion_passenger/templates/nginx/confirm_extra_configure_flags.txt.erb +5 -0
- data/lib/phusion_passenger/templates/nginx/deployment_example.txt.erb +22 -0
- data/lib/phusion_passenger/templates/nginx/pcre_could_not_be_downloaded.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/pcre_could_not_be_extracted.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/possible_solutions_for_download_and_extraction_problems.txt.erb +20 -0
- data/lib/phusion_passenger/templates/nginx/query_download_and_install.txt.erb +21 -0
- data/lib/phusion_passenger/templates/nginx/run_installer_as_root.txt.erb +8 -0
- data/lib/phusion_passenger/templates/nginx/welcome.txt.erb +15 -0
- data/lib/phusion_passenger/utils.rb +20 -15
- data/lib/phusion_passenger/wsgi/application_spawner.rb +18 -11
- data/lib/phusion_passenger/wsgi/request_handler.py +23 -0
- data/misc/copy_boost_headers.rb +23 -0
- data/misc/find_owner_pipe_leaks.rb +18 -11
- data/misc/rake/cplusplus.rb +18 -11
- data/misc/rake/extensions.rb +21 -14
- data/misc/render_error_pages.rb +18 -11
- data/test/ApplicationPoolServerTest.cpp +1 -3
- data/test/ApplicationPoolServer_ApplicationPoolTest.cpp +1 -1
- data/test/CxxTestMain.cpp +19 -3
- data/test/HttpStatusExtractorTest.cpp +181 -0
- data/test/ScgiRequestParserTest.cpp +337 -0
- data/test/StaticStringTest.cpp +51 -0
- data/test/UtilsTest.cpp +32 -0
- data/test/config.yml.example +5 -0
- data/test/{integration_tests.rb → integration_tests/apache2_tests.rb} +7 -299
- data/test/integration_tests/hello_world_rack_spec.rb +36 -0
- data/test/integration_tests/hello_world_wsgi_spec.rb +41 -0
- data/test/integration_tests/mycook_spec.rb +192 -0
- data/test/integration_tests/nginx_tests.rb +98 -0
- data/test/ruby/rack/application_spawner_spec.rb +40 -0
- data/test/stub/nginx/koi-utf +109 -0
- data/test/stub/nginx/koi-win +103 -0
- data/test/stub/nginx/mime.types +70 -0
- data/test/stub/nginx/nginx.conf.erb +57 -0
- data/test/stub/nginx/win-utf +126 -0
- data/test/stub/rails_apps/mycook/app/controllers/uploads_controller.rb +4 -0
- data/test/stub/rails_apps/mycook/config/routes.rb +1 -1
- data/test/stub/wsgi/passenger_wsgi.pyc +0 -0
- data/test/support/Support.h +40 -0
- data/test/support/nginx_controller.rb +98 -0
- data/test/support/test_helper.rb +79 -0
- metadata +1091 -1028
- data/benchmark/DummyRequestHandler.cpp +0 -101
- data/ext/apache2/Logging.cpp +0 -60
- data/ext/apache2/SystemTime.cpp +0 -28
@@ -77,10 +77,10 @@
|
|
77
77
|
|
78
78
|
<div class="description"><p>
|
79
79
|
Modifies CGI so that we can use it. Main thing it does is expose the <a
|
80
|
-
href="CGIFixed.html#
|
81
|
-
href="CGIFixed.html#
|
80
|
+
href="CGIFixed.html#M000046">stdinput</a> and <a
|
81
|
+
href="CGIFixed.html#M000047">stdoutput</a> so <a
|
82
82
|
href="RequestHandler.html">RequestHandler</a> can connect them to the right
|
83
|
-
sources. It also exposes the <a href="CGIFixed.html#
|
83
|
+
sources. It also exposes the <a href="CGIFixed.html#M000045">env_table</a>
|
84
84
|
so that <a href="RequestHandler.html">RequestHandler</a> can hook the
|
85
85
|
request parameters into the environment table.
|
86
86
|
</p>
|
@@ -94,11 +94,11 @@ backwards compatibility is removed.
|
|
94
94
|
|
95
95
|
<div class="sectiontitle">Methods</div>
|
96
96
|
<ul>
|
97
|
-
<li><a href="#
|
98
|
-
<li><a href="#
|
99
|
-
<li><a href="#
|
100
|
-
<li><a href="#
|
101
|
-
<li><a href="#
|
97
|
+
<li><a href="#M000044">args</a></li>
|
98
|
+
<li><a href="#M000045">env_table</a></li>
|
99
|
+
<li><a href="#M000043">new</a></li>
|
100
|
+
<li><a href="#M000046">stdinput</a></li>
|
101
|
+
<li><a href="#M000047">stdoutput</a></li>
|
102
102
|
</ul>
|
103
103
|
|
104
104
|
|
@@ -109,11 +109,11 @@ backwards compatibility is removed.
|
|
109
109
|
<div class="sectiontitle">Public Class methods</div>
|
110
110
|
<div class="method">
|
111
111
|
<div class="title">
|
112
|
-
<a name="
|
112
|
+
<a name="M000043"></a><b>new</b>(params, input, output, *args)
|
113
113
|
</div>
|
114
114
|
<div class="sourcecode">
|
115
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
116
|
-
<div id="
|
115
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show source</a> ]</p>
|
116
|
+
<div id="M000043_source" class="dyn-source">
|
117
117
|
<pre>
|
118
118
|
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/cgi_fixed.rb, line 42</span>
|
119
119
|
42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">params</span>, <span class="ruby-identifier">input</span>, <span class="ruby-identifier">output</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -130,11 +130,11 @@ backwards compatibility is removed.
|
|
130
130
|
<div class="sectiontitle">Public Instance methods</div>
|
131
131
|
<div class="method">
|
132
132
|
<div class="title">
|
133
|
-
<a name="
|
133
|
+
<a name="M000044"></a><b>args</b>()
|
134
134
|
</div>
|
135
135
|
<div class="sourcecode">
|
136
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
137
|
-
<div id="
|
136
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p>
|
137
|
+
<div id="M000044_source" class="dyn-source">
|
138
138
|
<pre>
|
139
139
|
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/cgi_fixed.rb, line 50</span>
|
140
140
|
50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">args</span>
|
@@ -146,11 +146,11 @@ backwards compatibility is removed.
|
|
146
146
|
</div>
|
147
147
|
<div class="method">
|
148
148
|
<div class="title">
|
149
|
-
<a name="
|
149
|
+
<a name="M000045"></a><b>env_table</b>()
|
150
150
|
</div>
|
151
151
|
<div class="sourcecode">
|
152
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
153
|
-
<div id="
|
152
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p>
|
153
|
+
<div id="M000045_source" class="dyn-source">
|
154
154
|
<pre>
|
155
155
|
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/cgi_fixed.rb, line 54</span>
|
156
156
|
54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">env_table</span>
|
@@ -162,11 +162,11 @@ backwards compatibility is removed.
|
|
162
162
|
</div>
|
163
163
|
<div class="method">
|
164
164
|
<div class="title">
|
165
|
-
<a name="
|
165
|
+
<a name="M000046"></a><b>stdinput</b>()
|
166
166
|
</div>
|
167
167
|
<div class="sourcecode">
|
168
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
169
|
-
<div id="
|
168
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p>
|
169
|
+
<div id="M000046_source" class="dyn-source">
|
170
170
|
<pre>
|
171
171
|
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/cgi_fixed.rb, line 58</span>
|
172
172
|
58: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stdinput</span>
|
@@ -178,11 +178,11 @@ backwards compatibility is removed.
|
|
178
178
|
</div>
|
179
179
|
<div class="method">
|
180
180
|
<div class="title">
|
181
|
-
<a name="
|
181
|
+
<a name="M000047"></a><b>stdoutput</b>()
|
182
182
|
</div>
|
183
183
|
<div class="sourcecode">
|
184
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
185
|
-
<div id="
|
184
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show source</a> ]</p>
|
185
|
+
<div id="M000047_source" class="dyn-source">
|
186
186
|
<pre>
|
187
187
|
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/cgi_fixed.rb, line 62</span>
|
188
188
|
62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stdoutput</span>
|
@@ -95,9 +95,9 @@ href="ApplicationSpawner.html">ApplicationSpawner</a> internally.
|
|
95
95
|
<p>
|
96
96
|
<b>Note</b>: <a href="FrameworkSpawner.html">FrameworkSpawner</a> may only
|
97
97
|
be started asynchronously with <a
|
98
|
-
href="../AbstractServer.html#
|
98
|
+
href="../AbstractServer.html#M000126">AbstractServer#start</a>. Starting it
|
99
99
|
synchronously with <a
|
100
|
-
href="../AbstractServer.html#
|
100
|
+
href="../AbstractServer.html#M000127">AbstractServer#start_synchronously</a>
|
101
101
|
has not been tested.
|
102
102
|
</p>
|
103
103
|
</div>
|
@@ -106,10 +106,10 @@ has not been tested.
|
|
106
106
|
|
107
107
|
<div class="sectiontitle">Methods</div>
|
108
108
|
<ul>
|
109
|
-
<li><a href="#
|
110
|
-
<li><a href="#
|
111
|
-
<li><a href="#
|
112
|
-
<li><a href="#
|
109
|
+
<li><a href="#M000039">new</a></li>
|
110
|
+
<li><a href="#M000042">reload</a></li>
|
111
|
+
<li><a href="#M000041">spawn_application</a></li>
|
112
|
+
<li><a href="#M000040">start</a></li>
|
113
113
|
</ul>
|
114
114
|
|
115
115
|
<div class="sectiontitle">Included Modules</div>
|
@@ -127,11 +127,11 @@ has not been tested.
|
|
127
127
|
<div class="sectiontitle">Public Class methods</div>
|
128
128
|
<div class="method">
|
129
129
|
<div class="title">
|
130
|
-
<a name="
|
130
|
+
<a name="M000039"></a><b>new</b>(options = {})
|
131
131
|
</div>
|
132
132
|
<div class="description">
|
133
133
|
<p>
|
134
|
-
Creates a <a href="FrameworkSpawner.html#
|
134
|
+
Creates a <a href="FrameworkSpawner.html#M000039">new</a> instance of <a
|
135
135
|
href="FrameworkSpawner.html">FrameworkSpawner</a>.
|
136
136
|
</p>
|
137
137
|
<p>
|
@@ -158,34 +158,34 @@ href="RequestHandler.html">RequestHandler</a>.
|
|
158
158
|
<p>
|
159
159
|
Note that the specified Rails framework will be loaded during the entire
|
160
160
|
life time of the <a href="FrameworkSpawner.html">FrameworkSpawner</a>
|
161
|
-
server. If you wish to <a href="FrameworkSpawner.html#
|
161
|
+
server. If you wish to <a href="FrameworkSpawner.html#M000042">reload</a>
|
162
162
|
the Rails framework‘s code, then restart the server by calling <a
|
163
|
-
href="../AbstractServer.html#
|
164
|
-
href="../AbstractServer.html#
|
163
|
+
href="../AbstractServer.html#M000128">AbstractServer#stop</a> and <a
|
164
|
+
href="../AbstractServer.html#M000126">AbstractServer#start</a>.
|
165
165
|
</p>
|
166
166
|
</div>
|
167
167
|
<div class="sourcecode">
|
168
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
169
|
-
<div id="
|
168
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show source</a> ]</p>
|
169
|
+
<div id="M000039_source" class="dyn-source">
|
170
170
|
<pre>
|
171
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/framework_spawner.rb, line
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
171
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/framework_spawner.rb, line 69</span>
|
172
|
+
69: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span> = {})
|
173
|
+
70: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value str">'[]'</span><span class="ruby-value str">'[]'</span>)
|
174
|
+
71: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"The 'options' argument not seem to be an options hash"</span>
|
175
|
+
72: <span class="ruby-keyword kw">end</span>
|
176
|
+
73: <span class="ruby-ivar">@version</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:version</span>]
|
177
|
+
74: <span class="ruby-ivar">@vendor</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:vendor</span>]
|
178
|
+
75: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@version</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@vendor</span>
|
179
|
+
76: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Either the 'version' or the 'vendor' option must specified"</span>
|
180
|
+
77: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@version</span> <span class="ruby-operator">&&</span> <span class="ruby-ivar">@vendor</span>
|
181
|
+
78: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"It is not allowed to specify both the 'version' and the 'vendor' options"</span>
|
182
|
+
79: <span class="ruby-keyword kw">end</span>
|
183
|
+
80:
|
184
|
+
81: <span class="ruby-keyword kw">super</span>()
|
185
|
+
82: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">max_idle_time</span> = <span class="ruby-constant">DEFAULT_FRAMEWORK_SPAWNER_MAX_IDLE_TIME</span>
|
186
|
+
83: <span class="ruby-identifier">define_message_handler</span>(<span class="ruby-identifier">:spawn_application</span>, <span class="ruby-identifier">:handle_spawn_application</span>)
|
187
|
+
84: <span class="ruby-identifier">define_message_handler</span>(<span class="ruby-identifier">:reload</span>, <span class="ruby-identifier">:handle_reload</span>)
|
188
|
+
85: <span class="ruby-keyword kw">end</span>
|
189
189
|
</pre>
|
190
190
|
</div>
|
191
191
|
</div>
|
@@ -193,7 +193,7 @@ href="../AbstractServer.html#M000124">AbstractServer#start</a>.
|
|
193
193
|
<div class="sectiontitle">Public Instance methods</div>
|
194
194
|
<div class="method">
|
195
195
|
<div class="title">
|
196
|
-
<a name="
|
196
|
+
<a name="M000042"></a><b>reload</b>(app_root = nil)
|
197
197
|
</div>
|
198
198
|
<div class="description">
|
199
199
|
<p>
|
@@ -205,9 +205,9 @@ will be removed, no matter the application root.
|
|
205
205
|
<b>Long description:</b> <a href="../Application.html">Application</a> code
|
206
206
|
might be cached in memory by a <a
|
207
207
|
href="FrameworkSpawner.html">FrameworkSpawner</a>. But once it a while, it
|
208
|
-
will be necessary to <a href="FrameworkSpawner.html#
|
208
|
+
will be necessary to <a href="FrameworkSpawner.html#M000042">reload</a> the
|
209
209
|
code for an application, such as after deploying a <a
|
210
|
-
href="FrameworkSpawner.html#
|
210
|
+
href="FrameworkSpawner.html#M000039">new</a> version of the application.
|
211
211
|
This method makes sure that any cached application code is removed, so that
|
212
212
|
the next time an application instance is spawned, the application code will
|
213
213
|
be freshly loaded into memory.
|
@@ -228,26 +228,26 @@ unexpectedly.
|
|
228
228
|
</ul>
|
229
229
|
</div>
|
230
230
|
<div class="sourcecode">
|
231
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
232
|
-
<div id="
|
231
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000042_source')" id="l_M000042_source">show source</a> ]</p>
|
232
|
+
<div id="M000042_source" class="dyn-source">
|
233
233
|
<pre>
|
234
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/framework_spawner.rb, line
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
234
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/framework_spawner.rb, line 203</span>
|
235
|
+
203: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reload</span>(<span class="ruby-identifier">app_root</span> = <span class="ruby-keyword kw">nil</span>)
|
236
|
+
204: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_root</span>.<span class="ruby-identifier">nil?</span>
|
237
|
+
205: <span class="ruby-identifier">server</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">"reload"</span>)
|
238
|
+
206: <span class="ruby-keyword kw">else</span>
|
239
|
+
207: <span class="ruby-identifier">server</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">"reload"</span>, <span class="ruby-identifier">app_root</span>)
|
240
|
+
208: <span class="ruby-keyword kw">end</span>
|
241
|
+
209: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SystemCallError</span>, <span class="ruby-constant">IOError</span>, <span class="ruby-constant">SocketError</span>
|
242
|
+
210: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Error</span>, <span class="ruby-value str">"The framework spawner server exited unexpectedly"</span>
|
243
|
+
211: <span class="ruby-keyword kw">end</span>
|
244
244
|
</pre>
|
245
245
|
</div>
|
246
246
|
</div>
|
247
247
|
</div>
|
248
248
|
<div class="method">
|
249
249
|
<div class="title">
|
250
|
-
<a name="
|
250
|
+
<a name="M000041"></a><b>spawn_application</b>(app_root, options = {})
|
251
251
|
</div>
|
252
252
|
<div class="description">
|
253
253
|
<p>
|
@@ -295,12 +295,12 @@ you must do one of these things:
|
|
295
295
|
</p>
|
296
296
|
<ul>
|
297
297
|
<li>Restart this <a href="FrameworkSpawner.html">FrameworkSpawner</a> by
|
298
|
-
calling <a href="../AbstractServer.html#
|
299
|
-
then <a href="../AbstractServer.html#
|
298
|
+
calling <a href="../AbstractServer.html#M000128">AbstractServer#stop</a>,
|
299
|
+
then <a href="../AbstractServer.html#M000126">AbstractServer#start</a>.
|
300
300
|
|
301
301
|
</li>
|
302
302
|
<li>Reload the application by calling <a
|
303
|
-
href="FrameworkSpawner.html#
|
303
|
+
href="FrameworkSpawner.html#M000042">reload</a> with the correct app_root
|
304
304
|
argument.
|
305
305
|
|
306
306
|
</li>
|
@@ -336,54 +336,53 @@ unexpectedly.
|
|
336
336
|
</ul>
|
337
337
|
</div>
|
338
338
|
<div class="sourcecode">
|
339
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
340
|
-
<div id="
|
339
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show source</a> ]</p>
|
340
|
+
<div id="M000041_source" class="dyn-source">
|
341
341
|
<pre>
|
342
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/framework_spawner.rb, line
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
181: <span class="ruby-keyword kw">end</span>
|
342
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/framework_spawner.rb, line 155</span>
|
343
|
+
155: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn_application</span>(<span class="ruby-identifier">app_root</span>, <span class="ruby-identifier">options</span> = {})
|
344
|
+
156: <span class="ruby-identifier">assert_valid_app_root</span>(<span class="ruby-identifier">app_root</span>)
|
345
|
+
157: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">sanitize_spawn_options</span>(<span class="ruby-identifier">options</span>)
|
346
|
+
158: <span class="ruby-identifier">options</span>[<span class="ruby-value str">"app_root"</span>] = <span class="ruby-identifier">app_root</span>
|
347
|
+
159:
|
348
|
+
160: <span class="ruby-identifier">exception_to_propagate</span> = <span class="ruby-keyword kw">nil</span>
|
349
|
+
161: <span class="ruby-keyword kw">begin</span>
|
350
|
+
162: <span class="ruby-identifier">server</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">"spawn_application"</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">options</span>.<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">flatten</span>)
|
351
|
+
163: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">server</span>.<span class="ruby-identifier">read</span>
|
352
|
+
164: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">nil?</span>
|
353
|
+
165: <span class="ruby-identifier">raise</span> <span class="ruby-constant">IOError</span>, <span class="ruby-value str">"Connection closed"</span>
|
354
|
+
166: <span class="ruby-keyword kw">end</span>
|
355
|
+
167: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'exception'</span>
|
356
|
+
168: <span class="ruby-identifier">e</span> = <span class="ruby-identifier">unmarshal_exception</span>(<span class="ruby-identifier">server</span>.<span class="ruby-identifier">read_scalar</span>)
|
357
|
+
169: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:child_exception</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">child_exception</span>
|
358
|
+
170: <span class="ruby-comment cmt">#print_exception(self.class.to_s, e.child_exception)</span>
|
359
|
+
171: <span class="ruby-keyword kw">end</span>
|
360
|
+
172: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
|
361
|
+
173: <span class="ruby-keyword kw">else</span>
|
362
|
+
174: <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">listen_socket_name</span>, <span class="ruby-identifier">socket_type</span> = <span class="ruby-identifier">server</span>.<span class="ruby-identifier">read</span>
|
363
|
+
175: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pid</span>.<span class="ruby-identifier">nil?</span>
|
364
|
+
176: <span class="ruby-identifier">raise</span> <span class="ruby-constant">IOError</span>, <span class="ruby-value str">"Connection closed"</span>
|
365
|
+
177: <span class="ruby-keyword kw">end</span>
|
366
|
+
178: <span class="ruby-identifier">owner_pipe</span> = <span class="ruby-identifier">server</span>.<span class="ruby-identifier">recv_io</span>
|
367
|
+
179: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Application</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">app_root</span>, <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">listen_socket_name</span>,
|
368
|
+
180: <span class="ruby-identifier">socket_type</span>, <span class="ruby-identifier">owner_pipe</span>)
|
369
|
+
181: <span class="ruby-keyword kw">end</span>
|
370
|
+
182: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SystemCallError</span>, <span class="ruby-constant">IOError</span>, <span class="ruby-constant">SocketError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
371
|
+
183: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Error</span>, <span class="ruby-value str">"The framework spawner server exited unexpectedly"</span>
|
372
|
+
184: <span class="ruby-keyword kw">end</span>
|
373
|
+
185: <span class="ruby-keyword kw">end</span>
|
375
374
|
</pre>
|
376
375
|
</div>
|
377
376
|
</div>
|
378
377
|
</div>
|
379
378
|
<div class="method">
|
380
379
|
<div class="title">
|
381
|
-
<a name="
|
380
|
+
<a name="M000040"></a><b>start</b>()
|
382
381
|
</div>
|
383
382
|
<div class="description">
|
384
383
|
<p>
|
385
384
|
Overrided from <a
|
386
|
-
href="../AbstractServer.html#
|
385
|
+
href="../AbstractServer.html#M000126">AbstractServer#start</a>.
|
387
386
|
</p>
|
388
387
|
<p>
|
389
388
|
May raise these additional exceptions:
|
@@ -401,37 +400,37 @@ unexpectedly.
|
|
401
400
|
</ul>
|
402
401
|
</div>
|
403
402
|
<div class="sourcecode">
|
404
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
405
|
-
<div id="
|
403
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show source</a> ]</p>
|
404
|
+
<div id="M000040_source" class="dyn-source">
|
406
405
|
<pre>
|
407
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/framework_spawner.rb, line
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
406
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/framework_spawner.rb, line 92</span>
|
407
|
+
92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>
|
408
|
+
93: <span class="ruby-keyword kw">super</span>
|
409
|
+
94: <span class="ruby-keyword kw">begin</span>
|
410
|
+
95: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">server</span>.<span class="ruby-identifier">read</span>
|
411
|
+
96: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">nil?</span>
|
412
|
+
97: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Error</span>, <span class="ruby-value str">"The framework spawner server exited unexpectedly."</span>
|
413
|
+
98: <span class="ruby-keyword kw">else</span>
|
414
|
+
99: <span class="ruby-identifier">status</span> = <span class="ruby-identifier">result</span>[<span class="ruby-value">0</span>]
|
415
|
+
100: <span class="ruby-keyword kw">end</span>
|
416
|
+
101: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">status</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'exception'</span>
|
417
|
+
102: <span class="ruby-identifier">child_exception</span> = <span class="ruby-identifier">unmarshal_exception</span>(<span class="ruby-identifier">server</span>.<span class="ruby-identifier">read_scalar</span>)
|
418
|
+
103: <span class="ruby-identifier">stop</span>
|
419
|
+
104: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@version</span>
|
420
|
+
105: <span class="ruby-identifier">message</span> = <span class="ruby-node">"Could not load Ruby on Rails framework version #{@version}: "</span> <span class="ruby-operator"><<</span>
|
421
|
+
106: <span class="ruby-node">"#{child_exception.class} (#{child_exception.message})"</span>
|
422
|
+
107: <span class="ruby-keyword kw">else</span>
|
423
|
+
108: <span class="ruby-identifier">message</span> = <span class="ruby-node">"Could not load Ruby on Rails framework at '#{@vendor}': "</span> <span class="ruby-operator"><<</span>
|
424
|
+
109: <span class="ruby-node">"#{child_exception.class} (#{child_exception.message})"</span>
|
425
|
+
110: <span class="ruby-keyword kw">end</span>
|
426
|
+
111: <span class="ruby-identifier">options</span> = { <span class="ruby-identifier">:vendor</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@vendor</span>, <span class="ruby-identifier">:version</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@version</span> }
|
427
|
+
112: <span class="ruby-identifier">raise</span> <span class="ruby-constant">FrameworkInitError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">child_exception</span>, <span class="ruby-identifier">options</span>)
|
428
|
+
113: <span class="ruby-keyword kw">end</span>
|
429
|
+
114: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">IOError</span>, <span class="ruby-constant">SystemCallError</span>, <span class="ruby-constant">SocketError</span>
|
430
|
+
115: <span class="ruby-identifier">stop</span>
|
431
|
+
116: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Error</span>, <span class="ruby-value str">"The framework spawner server exited unexpectedly"</span>
|
432
|
+
117: <span class="ruby-keyword kw">end</span>
|
433
|
+
118: <span class="ruby-keyword kw">end</span>
|
435
434
|
</pre>
|
436
435
|
</div>
|
437
436
|
</div>
|
@@ -84,8 +84,8 @@ A request handler for Ruby on Rails applications.
|
|
84
84
|
|
85
85
|
<div class="sectiontitle">Methods</div>
|
86
86
|
<ul>
|
87
|
-
<li><a href="#
|
88
|
-
<li><a href="#
|
87
|
+
<li><a href="#M000052">new</a></li>
|
88
|
+
<li><a href="#M000053">process_request</a></li>
|
89
89
|
</ul>
|
90
90
|
|
91
91
|
|
@@ -104,19 +104,19 @@ A request handler for Ruby on Rails applications.
|
|
104
104
|
<div class="sectiontitle">Public Class methods</div>
|
105
105
|
<div class="method">
|
106
106
|
<div class="title">
|
107
|
-
<a name="
|
107
|
+
<a name="M000052"></a><b>new</b>(owner_pipe, options = {})
|
108
108
|
</div>
|
109
109
|
<div class="sourcecode">
|
110
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
111
|
-
<div id="
|
110
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000052_source')" id="l_M000052_source">show source</a> ]</p>
|
111
|
+
<div id="M000052_source" class="dyn-source">
|
112
112
|
<pre>
|
113
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/request_handler.rb, line
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
113
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/request_handler.rb, line 34</span>
|
114
|
+
34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">owner_pipe</span>, <span class="ruby-identifier">options</span> = {})
|
115
|
+
35: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">owner_pipe</span>, <span class="ruby-identifier">options</span>)
|
116
|
+
36: <span class="ruby-constant">NINJA_PATCHING_LOCK</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span>
|
117
|
+
37: <span class="ruby-identifier">ninja_patch_action_controller</span>
|
118
|
+
38: <span class="ruby-keyword kw">end</span>
|
119
|
+
39: <span class="ruby-keyword kw">end</span>
|
120
120
|
</pre>
|
121
121
|
</div>
|
122
122
|
</div>
|
@@ -124,7 +124,7 @@ A request handler for Ruby on Rails applications.
|
|
124
124
|
<div class="sectiontitle">Protected Instance methods</div>
|
125
125
|
<div class="method">
|
126
126
|
<div class="title">
|
127
|
-
<a name="
|
127
|
+
<a name="M000053"></a><b>process_request</b>(headers, input, output)
|
128
128
|
</div>
|
129
129
|
<div class="description">
|
130
130
|
<p>
|
@@ -132,16 +132,16 @@ Overrided method.
|
|
132
132
|
</p>
|
133
133
|
</div>
|
134
134
|
<div class="sourcecode">
|
135
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
136
|
-
<div id="
|
135
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000053_source')" id="l_M000053_source">show source</a> ]</p>
|
136
|
+
<div id="M000053_source" class="dyn-source">
|
137
137
|
<pre>
|
138
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/request_handler.rb, line
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
138
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/request_handler.rb, line 43</span>
|
139
|
+
43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_request</span>(<span class="ruby-identifier">headers</span>, <span class="ruby-identifier">input</span>, <span class="ruby-identifier">output</span>)
|
140
|
+
44: <span class="ruby-identifier">cgi</span> = <span class="ruby-constant">CGIFixed</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">headers</span>, <span class="ruby-identifier">input</span>, <span class="ruby-identifier">output</span>)
|
141
|
+
45: <span class="ruby-operator">::</span><span class="ruby-constant">Dispatcher</span>.<span class="ruby-identifier">dispatch</span>(<span class="ruby-identifier">cgi</span>,
|
142
|
+
46: <span class="ruby-operator">::</span><span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">CgiRequest</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_SESSION_OPTIONS</span>,
|
143
|
+
47: <span class="ruby-identifier">cgi</span>.<span class="ruby-identifier">stdoutput</span>)
|
144
|
+
48: <span class="ruby-keyword kw">end</span>
|
145
145
|
</pre>
|
146
146
|
</div>
|
147
147
|
</div>
|