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
@@ -78,12 +78,12 @@ Utility functions for accessing system functionality.
|
|
78
78
|
|
79
79
|
<div class="sectiontitle">Methods</div>
|
80
80
|
<ul>
|
81
|
-
<li><a href="#
|
82
|
-
<li><a href="#
|
83
|
-
<li><a href="#
|
84
|
-
<li><a href="#
|
85
|
-
<li><a href="#
|
86
|
-
<li><a href="#
|
81
|
+
<li><a href="#M000061">accept</a></li>
|
82
|
+
<li><a href="#M000062">close_all_file_descriptors</a></li>
|
83
|
+
<li><a href="#M000060">create_unix_socket</a></li>
|
84
|
+
<li><a href="#M000063">disable_stdio_buffering</a></li>
|
85
|
+
<li><a href="#M000059">recv_fd</a></li>
|
86
|
+
<li><a href="#M000058">send_fd</a></li>
|
87
87
|
</ul>
|
88
88
|
|
89
89
|
|
@@ -109,7 +109,7 @@ The maximum length of a Unix socket path, including terminating null.
|
|
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="M000061"></a><b> accept(fileno)<br />
|
113
113
|
</b>
|
114
114
|
</div>
|
115
115
|
<div class="description">
|
@@ -129,8 +129,8 @@ Accept a new client from the given socket.
|
|
129
129
|
</ul>
|
130
130
|
</div>
|
131
131
|
<div class="sourcecode">
|
132
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
133
|
-
<div id="
|
132
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000061_source')" id="l_M000061_source">show source</a> ]</p>
|
133
|
+
<div id="M000061_source" class="dyn-source">
|
134
134
|
<pre>
|
135
135
|
/*
|
136
136
|
* call-seq: accept(fileno)
|
@@ -150,7 +150,7 @@ f_accept(VALUE self, VALUE fileno) {
|
|
150
150
|
</div>
|
151
151
|
<div class="method">
|
152
152
|
<div class="title">
|
153
|
-
<a name="
|
153
|
+
<a name="M000062"></a><b> close_all_file_descriptors(exceptions)<br />
|
154
154
|
</b>
|
155
155
|
</div>
|
156
156
|
<div class="description">
|
@@ -164,8 +164,8 @@ standard input (0) and standard output (1).
|
|
164
164
|
</pre>
|
165
165
|
</div>
|
166
166
|
<div class="sourcecode">
|
167
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
168
|
-
<div id="
|
167
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000062_source')" id="l_M000062_source">show source</a> ]</p>
|
168
|
+
<div id="M000062_source" class="dyn-source">
|
169
169
|
<pre>
|
170
170
|
/*
|
171
171
|
* call-seq: close_all_file_descriptors(exceptions)
|
@@ -185,7 +185,7 @@ close_all_file_descriptors(VALUE self, VALUE exceptions) {
|
|
185
185
|
</div>
|
186
186
|
<div class="method">
|
187
187
|
<div class="title">
|
188
|
-
<a name="
|
188
|
+
<a name="M000060"></a><b> create_unix_socket(filename, backlog)<br />
|
189
189
|
</b>
|
190
190
|
</div>
|
191
191
|
<div class="description">
|
@@ -210,8 +210,8 @@ namespace by prepending the filename with a null byte.
|
|
210
210
|
</ul>
|
211
211
|
</div>
|
212
212
|
<div class="sourcecode">
|
213
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
214
|
-
<div id="
|
213
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000060_source')" id="l_M000060_source">show source</a> ]</p>
|
214
|
+
<div id="M000060_source" class="dyn-source">
|
215
215
|
<pre>
|
216
216
|
/*
|
217
217
|
* call-seq: create_unix_socket(filename, backlog)
|
@@ -234,7 +234,7 @@ create_unix_socket(VALUE self, VALUE filename, VALUE backlog) {
|
|
234
234
|
</div>
|
235
235
|
<div class="method">
|
236
236
|
<div class="title">
|
237
|
-
<a name="
|
237
|
+
<a name="M000063"></a><b> disable_stdio_buffering<br />
|
238
238
|
</b>
|
239
239
|
</div>
|
240
240
|
<div class="description">
|
@@ -245,8 +245,8 @@ immediate effect.
|
|
245
245
|
</p>
|
246
246
|
</div>
|
247
247
|
<div class="sourcecode">
|
248
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
249
|
-
<div id="
|
248
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000063_source')" id="l_M000063_source">show source</a> ]</p>
|
249
|
+
<div id="M000063_source" class="dyn-source">
|
250
250
|
<pre>
|
251
251
|
/*
|
252
252
|
* call-seq: disable_stdio_buffering
|
@@ -263,7 +263,7 @@ disable_stdio_buffering() {
|
|
263
263
|
</div>
|
264
264
|
<div class="method">
|
265
265
|
<div class="title">
|
266
|
-
<a name="
|
266
|
+
<a name="M000059"></a><b> recv_fd(socket_fd)<br />
|
267
267
|
</b>
|
268
268
|
</div>
|
269
269
|
<div class="description">
|
@@ -278,8 +278,8 @@ provided by <a href="../IO.html#M000006">IO#recv_io</a>.
|
|
278
278
|
</p>
|
279
279
|
</div>
|
280
280
|
<div class="sourcecode">
|
281
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
282
|
-
<div id="
|
281
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000059_source')" id="l_M000059_source">show source</a> ]</p>
|
282
|
+
<div id="M000059_source" class="dyn-source">
|
283
283
|
<pre>
|
284
284
|
/*
|
285
285
|
* call-seq: recv_fd(socket_fd)
|
@@ -300,7 +300,7 @@ recv_fd(VALUE self, VALUE socket_fd) {
|
|
300
300
|
</div>
|
301
301
|
<div class="method">
|
302
302
|
<div class="title">
|
303
|
-
<a name="
|
303
|
+
<a name="M000058"></a><b> send_fd(socket_fd, fd_to_send)<br />
|
304
304
|
</b>
|
305
305
|
</div>
|
306
306
|
<div class="description">
|
@@ -322,8 +322,8 @@ href="../IO.html#M000005">IO#send_io</a>.
|
|
322
322
|
</ul>
|
323
323
|
</div>
|
324
324
|
<div class="sourcecode">
|
325
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
326
|
-
<div id="
|
325
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000058_source')" id="l_M000058_source">show source</a> ]</p>
|
326
|
+
<div id="M000058_source" class="dyn-source">
|
327
327
|
<pre>
|
328
328
|
/*
|
329
329
|
* call-seq: send_fd(socket_fd, fd_to_send)
|
@@ -84,8 +84,8 @@ Class for spawning <a href="../Rack.html">Rack</a> 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="#M000054">spawn_application</a></li>
|
88
|
+
<li><a href="#M000055">spawn_application</a></li>
|
89
89
|
</ul>
|
90
90
|
|
91
91
|
<div class="sectiontitle">Included Modules</div>
|
@@ -100,17 +100,17 @@ Class for spawning <a href="../Rack.html">Rack</a> applications.
|
|
100
100
|
<div class="sectiontitle">Public Class methods</div>
|
101
101
|
<div class="method">
|
102
102
|
<div class="title">
|
103
|
-
<a name="
|
103
|
+
<a name="M000054"></a><b>spawn_application</b>(*args)
|
104
104
|
</div>
|
105
105
|
<div class="sourcecode">
|
106
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
107
|
-
<div id="
|
106
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000054_source')" id="l_M000054_source">show source</a> ]</p>
|
107
|
+
<div id="M000054_source" class="dyn-source">
|
108
108
|
<pre>
|
109
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/rack/application_spawner.rb, line
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
109
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rack/application_spawner.rb, line 42</span>
|
110
|
+
42: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">spawn_application</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
111
|
+
43: <span class="ruby-ivar">@@instance</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">ApplicationSpawner</span>.<span class="ruby-identifier">new</span>
|
112
|
+
44: <span class="ruby-ivar">@@instance</span>.<span class="ruby-identifier">spawn_application</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
113
|
+
45: <span class="ruby-keyword kw">end</span>
|
114
114
|
</pre>
|
115
115
|
</div>
|
116
116
|
</div>
|
@@ -118,7 +118,7 @@ Class for spawning <a href="../Rack.html">Rack</a> applications.
|
|
118
118
|
<div class="sectiontitle">Public Instance methods</div>
|
119
119
|
<div class="method">
|
120
120
|
<div class="title">
|
121
|
-
<a name="
|
121
|
+
<a name="M000055"></a><b>spawn_application</b>(app_root, options = {})
|
122
122
|
</div>
|
123
123
|
<div class="description">
|
124
124
|
<p>
|
@@ -141,38 +141,38 @@ exit() during startup.
|
|
141
141
|
</ul>
|
142
142
|
</div>
|
143
143
|
<div class="sourcecode">
|
144
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
145
|
-
<div id="
|
144
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000055_source')" id="l_M000055_source">show source</a> ]</p>
|
145
|
+
<div id="M000055_source" class="dyn-source">
|
146
146
|
<pre>
|
147
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/rack/application_spawner.rb, line
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
147
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rack/application_spawner.rb, line 55</span>
|
148
|
+
55: <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> = {})
|
149
|
+
56: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">sanitize_spawn_options</span>(<span class="ruby-identifier">options</span>)
|
150
|
+
57:
|
151
|
+
58: <span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span> = <span class="ruby-constant">UNIXSocket</span>.<span class="ruby-identifier">pair</span>
|
152
|
+
59: <span class="ruby-identifier">pid</span> = <span class="ruby-identifier">safe_fork</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">do</span>
|
153
|
+
60: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">close</span>
|
154
|
+
61:
|
155
|
+
62: <span class="ruby-identifier">file_descriptors_to_leave_open</span> = [<span class="ruby-value">0</span>, <span class="ruby-value">1</span>, <span class="ruby-value">2</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">fileno</span>]
|
156
|
+
63: <span class="ruby-constant">NativeSupport</span>.<span class="ruby-identifier">close_all_file_descriptors</span>(<span class="ruby-identifier">file_descriptors_to_leave_open</span>)
|
157
|
+
64: <span class="ruby-identifier">close_all_io_objects_for_fds</span>(<span class="ruby-identifier">file_descriptors_to_leave_open</span>)
|
158
|
+
65:
|
159
|
+
66: <span class="ruby-identifier">run</span>(<span class="ruby-constant">MessageChannel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">b</span>), <span class="ruby-identifier">app_root</span>, <span class="ruby-identifier">options</span>)
|
160
|
+
67: <span class="ruby-keyword kw">end</span>
|
161
|
+
68: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">close</span>
|
162
|
+
69: <span class="ruby-constant">Process</span>.<span class="ruby-identifier">waitpid</span>(<span class="ruby-identifier">pid</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
163
|
+
70:
|
164
|
+
71: <span class="ruby-identifier">channel</span> = <span class="ruby-constant">MessageChannel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">a</span>)
|
165
|
+
72: <span class="ruby-identifier">unmarshal_and_raise_errors</span>(<span class="ruby-identifier">channel</span>, <span class="ruby-value str">"rack"</span>)
|
166
|
+
73:
|
167
|
+
74: <span class="ruby-comment cmt"># No exception was raised, so spawning succeeded.</span>
|
168
|
+
75: <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">socket_name</span>, <span class="ruby-identifier">socket_type</span> = <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">read</span>
|
169
|
+
76: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pid</span>.<span class="ruby-identifier">nil?</span>
|
170
|
+
77: <span class="ruby-identifier">raise</span> <span class="ruby-constant">IOError</span>, <span class="ruby-value str">"Connection closed"</span>
|
171
|
+
78: <span class="ruby-keyword kw">end</span>
|
172
|
+
79: <span class="ruby-identifier">owner_pipe</span> = <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">recv_io</span>
|
173
|
+
80: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Application</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@app_root</span>, <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">socket_name</span>,
|
174
|
+
81: <span class="ruby-identifier">socket_type</span>, <span class="ruby-identifier">owner_pipe</span>)
|
175
|
+
82: <span class="ruby-keyword kw">end</span>
|
176
176
|
</pre>
|
177
177
|
</div>
|
178
178
|
</div>
|
@@ -84,8 +84,8 @@ A request handler for <a href="../Rack.html">Rack</a> 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="#M000056">new</a></li>
|
88
|
+
<li><a href="#M000057">process_request</a></li>
|
89
89
|
</ul>
|
90
90
|
|
91
91
|
|
@@ -96,7 +96,7 @@ A request handler for <a href="../Rack.html">Rack</a> applications.
|
|
96
96
|
<div class="sectiontitle">Public Class methods</div>
|
97
97
|
<div class="method">
|
98
98
|
<div class="title">
|
99
|
-
<a name="
|
99
|
+
<a name="M000056"></a><b>new</b>(owner_pipe, app, options = {})
|
100
100
|
</div>
|
101
101
|
<div class="description">
|
102
102
|
<p>
|
@@ -104,14 +104,14 @@ A request handler for <a href="../Rack.html">Rack</a> applications.
|
|
104
104
|
</p>
|
105
105
|
</div>
|
106
106
|
<div class="sourcecode">
|
107
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
108
|
-
<div id="
|
107
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000056_source')" id="l_M000056_source">show source</a> ]</p>
|
108
|
+
<div id="M000056_source" class="dyn-source">
|
109
109
|
<pre>
|
110
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/rack/request_handler.rb, line
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
110
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rack/request_handler.rb, line 50</span>
|
111
|
+
50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">owner_pipe</span>, <span class="ruby-identifier">app</span>, <span class="ruby-identifier">options</span> = {})
|
112
|
+
51: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">owner_pipe</span>, <span class="ruby-identifier">options</span>)
|
113
|
+
52: <span class="ruby-ivar">@app</span> = <span class="ruby-identifier">app</span>
|
114
|
+
53: <span class="ruby-keyword kw">end</span>
|
115
115
|
</pre>
|
116
116
|
</div>
|
117
117
|
</div>
|
@@ -119,7 +119,7 @@ A request handler for <a href="../Rack.html">Rack</a> applications.
|
|
119
119
|
<div class="sectiontitle">Protected Instance methods</div>
|
120
120
|
<div class="method">
|
121
121
|
<div class="title">
|
122
|
-
<a name="
|
122
|
+
<a name="M000057"></a><b>process_request</b>(env, input, output)
|
123
123
|
</div>
|
124
124
|
<div class="description">
|
125
125
|
<p>
|
@@ -127,49 +127,51 @@ Overrided method.
|
|
127
127
|
</p>
|
128
128
|
</div>
|
129
129
|
<div class="sourcecode">
|
130
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
131
|
-
<div id="
|
130
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000057_source')" id="l_M000057_source">show source</a> ]</p>
|
131
|
+
<div id="M000057_source" class="dyn-source">
|
132
132
|
<pre>
|
133
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/rack/request_handler.rb, line
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
133
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rack/request_handler.rb, line 57</span>
|
134
|
+
57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_request</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">input</span>, <span class="ruby-identifier">output</span>)
|
135
|
+
58: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_VERSION</span>] = <span class="ruby-constant">RACK_VERSION_VALUE</span>
|
136
|
+
59: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_INPUT</span>] = <span class="ruby-identifier">input</span>
|
137
|
+
60: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_ERRORS</span>] = <span class="ruby-constant">STDERR</span>
|
138
|
+
61: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_MULTITHREAD</span>] = <span class="ruby-keyword kw">false</span>
|
139
|
+
62: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_MULTIPROCESS</span>] = <span class="ruby-keyword kw">true</span>
|
140
|
+
63: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_RUN_ONCE</span>] = <span class="ruby-keyword kw">false</span>
|
141
|
+
64: <span class="ruby-identifier">env</span>[<span class="ruby-constant">SCRIPT_NAME</span>] <span class="ruby-operator">||=</span> <span class="ruby-value str">''</span>
|
142
|
+
65: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-constant">PATH_INFO</span>)
|
143
|
+
66: <span class="ruby-identifier">env</span>[<span class="ruby-constant">PATH_INFO</span>].<span class="ruby-identifier">sub!</span>(<span class="ruby-node">/^#{Regexp.escape(env[SCRIPT_NAME])}/</span>, <span class="ruby-value str">""</span>)
|
144
|
+
67: <span class="ruby-keyword kw">end</span>
|
145
|
+
68: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTPS</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">YES</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTPS</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">ON</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTPS</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">ONE</span>
|
146
|
+
69: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_URL_SCHEME</span>] = <span class="ruby-constant">HTTPS_DOWNCASE</span>
|
147
|
+
70: <span class="ruby-keyword kw">else</span>
|
148
|
+
71: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_URL_SCHEME</span>] = <span class="ruby-constant">HTTP</span>
|
149
|
+
72: <span class="ruby-keyword kw">end</span>
|
150
|
+
73:
|
151
|
+
74: <span class="ruby-identifier">status</span>, <span class="ruby-identifier">headers</span>, <span class="ruby-identifier">body</span> = <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">env</span>)
|
152
|
+
75: <span class="ruby-keyword kw">begin</span>
|
153
|
+
76: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">"Status: #{status}#{CRLF}"</span>)
|
154
|
+
77: <span class="ruby-identifier">headers</span>[<span class="ruby-constant">X_POWERED_BY</span>] = <span class="ruby-constant">PASSENGER_HEADER</span>
|
155
|
+
78: <span class="ruby-identifier">headers</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">values</span><span class="ruby-operator">|</span>
|
156
|
+
79: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">values</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
157
|
+
80: <span class="ruby-identifier">values</span> = <span class="ruby-identifier">values</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"\n"</span>)
|
158
|
+
81: <span class="ruby-keyword kw">end</span>
|
159
|
+
82: <span class="ruby-identifier">values</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
160
|
+
83: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">"#{key}: #{value}#{CRLF}"</span>)
|
161
|
+
84: <span class="ruby-keyword kw">end</span>
|
162
|
+
85: <span class="ruby-keyword kw">end</span>
|
163
|
+
86: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">CRLF</span>)
|
164
|
+
87: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">body</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
165
|
+
88: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">body</span>)
|
166
|
+
89: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">body</span>
|
167
|
+
90: <span class="ruby-identifier">body</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
168
|
+
91: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">s</span>)
|
169
|
+
92: <span class="ruby-keyword kw">end</span>
|
170
|
+
93: <span class="ruby-keyword kw">end</span>
|
171
|
+
94: <span class="ruby-keyword kw">ensure</span>
|
172
|
+
95: <span class="ruby-identifier">body</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">body</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:close</span>)
|
173
|
+
96: <span class="ruby-keyword kw">end</span>
|
174
|
+
97: <span class="ruby-keyword kw">end</span>
|
173
175
|
</pre>
|
174
176
|
</div>
|
175
177
|
</div>
|
@@ -58,9 +58,9 @@
|
|
58
58
|
<td>In:</td>
|
59
59
|
<td>
|
60
60
|
<a href="../../files/lib/phusion_passenger/railz/application_spawner_rb.html">lib/phusion_passenger/railz/application_spawner.rb</a>
|
61
|
-
<a href="../../files/lib/phusion_passenger/railz/request_handler_rb.html">lib/phusion_passenger/railz/request_handler.rb</a>
|
62
61
|
<a href="../../files/lib/phusion_passenger/railz/cgi_fixed_rb.html">lib/phusion_passenger/railz/cgi_fixed.rb</a>
|
63
62
|
<a href="../../files/lib/phusion_passenger/railz/framework_spawner_rb.html">lib/phusion_passenger/railz/framework_spawner.rb</a>
|
63
|
+
<a href="../../files/lib/phusion_passenger/railz/request_handler_rb.html">lib/phusion_passenger/railz/request_handler.rb</a>
|
64
64
|
</td>
|
65
65
|
</tr>
|
66
66
|
</table>
|
@@ -90,9 +90,9 @@ multiple different Ruby on Rails applications.
|
|
90
90
|
<p>
|
91
91
|
<b>Note</b>: <a href="ApplicationSpawner.html">ApplicationSpawner</a> may
|
92
92
|
only be started asynchronously with <a
|
93
|
-
href="../AbstractServer.html#
|
93
|
+
href="../AbstractServer.html#M000126">AbstractServer#start</a>. Starting it
|
94
94
|
synchronously with <a
|
95
|
-
href="../AbstractServer.html#
|
95
|
+
href="../AbstractServer.html#M000127">AbstractServer#start_synchronously</a>
|
96
96
|
has not been tested.
|
97
97
|
</p>
|
98
98
|
</div>
|
@@ -101,10 +101,10 @@ has not been tested.
|
|
101
101
|
|
102
102
|
<div class="sectiontitle">Methods</div>
|
103
103
|
<ul>
|
104
|
-
<li><a href="#
|
105
|
-
<li><a href="#
|
106
|
-
<li><a href="#
|
107
|
-
<li><a href="#
|
104
|
+
<li><a href="#M000048">new</a></li>
|
105
|
+
<li><a href="#M000049">spawn_application</a></li>
|
106
|
+
<li><a href="#M000050">spawn_application!</a></li>
|
107
|
+
<li><a href="#M000051">start</a></li>
|
108
108
|
</ul>
|
109
109
|
|
110
110
|
<div class="sectiontitle">Included Modules</div>
|
@@ -162,7 +162,7 @@ The application root of this spawner.
|
|
162
162
|
<div class="sectiontitle">Public Class methods</div>
|
163
163
|
<div class="method">
|
164
164
|
<div class="title">
|
165
|
-
<a name="
|
165
|
+
<a name="M000048"></a><b>new</b>(app_root, options = {})
|
166
166
|
</div>
|
167
167
|
<div class="description">
|
168
168
|
<p>
|
@@ -204,19 +204,14 @@ href="RequestHandler.html">RequestHandler</a>.
|
|
204
204
|
</p>
|
205
205
|
</div>
|
206
206
|
<div class="sourcecode">
|
207
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
208
|
-
<div id="
|
207
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000048_source')" id="l_M000048_source">show source</a> ]</p>
|
208
|
+
<div id="M000048_source" class="dyn-source">
|
209
209
|
<pre>
|
210
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
87: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SystemCallError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
216
|
-
88: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidPath</span>, <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>
|
217
|
-
89: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">InvalidPath</span>
|
218
|
-
90: <span class="ruby-identifier">raise</span>
|
219
|
-
91: <span class="ruby-keyword kw">end</span>
|
210
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line 88</span>
|
211
|
+
88: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">app_root</span>, <span class="ruby-identifier">options</span> = {})
|
212
|
+
89: <span class="ruby-keyword kw">super</span>()
|
213
|
+
90: <span class="ruby-ivar">@app_root</span> = <span class="ruby-identifier">app_root</span>
|
214
|
+
91: <span class="ruby-ivar">@canonicalized_app_root</span> = <span class="ruby-identifier">canonicalize_path</span>(<span class="ruby-identifier">app_root</span>)
|
220
215
|
92: <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">sanitize_spawn_options</span>(<span class="ruby-identifier">options</span>)
|
221
216
|
93: <span class="ruby-ivar">@lower_privilege</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value str">"lower_privilege"</span>]
|
222
217
|
94: <span class="ruby-ivar">@lowest_user</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value str">"lowest_user"</span>]
|
@@ -232,7 +227,7 @@ href="RequestHandler.html">RequestHandler</a>.
|
|
232
227
|
<div class="sectiontitle">Public Instance methods</div>
|
233
228
|
<div class="method">
|
234
229
|
<div class="title">
|
235
|
-
<a name="
|
230
|
+
<a name="M000049"></a><b>spawn_application</b>()
|
236
231
|
</div>
|
237
232
|
<div class="description">
|
238
233
|
<p>
|
@@ -258,8 +253,8 @@ unexpectedly.
|
|
258
253
|
</ul>
|
259
254
|
</div>
|
260
255
|
<div class="sourcecode">
|
261
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
262
|
-
<div id="
|
256
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000049_source')" id="l_M000049_source">show source</a> ]</p>
|
257
|
+
<div id="M000049_source" class="dyn-source">
|
263
258
|
<pre>
|
264
259
|
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line 107</span>
|
265
260
|
107: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn_application</span>
|
@@ -280,7 +275,7 @@ unexpectedly.
|
|
280
275
|
</div>
|
281
276
|
<div class="method">
|
282
277
|
<div class="title">
|
283
|
-
<a name="
|
278
|
+
<a name="M000050"></a><b>spawn_application!</b>()
|
284
279
|
</div>
|
285
280
|
<div class="description">
|
286
281
|
<p>
|
@@ -289,7 +284,7 @@ href="../Application.html">Application</a> object will be returned, which
|
|
289
284
|
represents the spawned RoR application.
|
290
285
|
</p>
|
291
286
|
<p>
|
292
|
-
Unlike <a href="ApplicationSpawner.html#
|
287
|
+
Unlike <a href="ApplicationSpawner.html#M000049">spawn_application</a>,
|
293
288
|
this method may be called even when the <a
|
294
289
|
href="ApplicationSpawner.html">ApplicationSpawner</a> server isn‘t
|
295
290
|
started. This allows one to spawn a RoR application without preloading any
|
@@ -313,8 +308,8 @@ application raised an exception or called exit() during startup.
|
|
313
308
|
</ul>
|
314
309
|
</div>
|
315
310
|
<div class="sourcecode">
|
316
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
317
|
-
<div id="
|
311
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000050_source')" id="l_M000050_source">show source</a> ]</p>
|
312
|
+
<div id="M000050_source" class="dyn-source">
|
318
313
|
<pre>
|
319
314
|
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line 134</span>
|
320
315
|
134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn_application!</span>
|
@@ -373,12 +368,12 @@ application raised an exception or called exit() during startup.
|
|
373
368
|
</div>
|
374
369
|
<div class="method">
|
375
370
|
<div class="title">
|
376
|
-
<a name="
|
371
|
+
<a name="M000051"></a><b>start</b>()
|
377
372
|
</div>
|
378
373
|
<div class="description">
|
379
374
|
<p>
|
380
375
|
Overrided from <a
|
381
|
-
href="../AbstractServer.html#
|
376
|
+
href="../AbstractServer.html#M000126">AbstractServer#start</a>.
|
382
377
|
</p>
|
383
378
|
<p>
|
384
379
|
May raise these additional exceptions:
|
@@ -396,8 +391,8 @@ unexpectedly.
|
|
396
391
|
</ul>
|
397
392
|
</div>
|
398
393
|
<div class="sourcecode">
|
399
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
400
|
-
<div id="
|
394
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000051_source')" id="l_M000051_source">show source</a> ]</p>
|
395
|
+
<div id="M000051_source" class="dyn-source">
|
401
396
|
<pre>
|
402
397
|
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line 191</span>
|
403
398
|
191: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>
|