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
@@ -0,0 +1,36 @@
|
|
1
|
+
shared_examples_for "HelloWorld Rack application" do
|
2
|
+
it "is possible to fetch static assets" do
|
3
|
+
get('/rack.jpg').should == @stub.public_file('rack.jpg')
|
4
|
+
end
|
5
|
+
|
6
|
+
it "is possible to GET a regular Rack page" do
|
7
|
+
get('/').should =~ /hello/
|
8
|
+
end
|
9
|
+
|
10
|
+
it "supports restarting via restart.txt" do
|
11
|
+
get('/').should =~ /hello/
|
12
|
+
File.write("#{@stub.app_root}/config.ru", %q{
|
13
|
+
app = lambda do |env|
|
14
|
+
[200, { "Content-Type" => "text/html" }, "changed"]
|
15
|
+
end
|
16
|
+
run app
|
17
|
+
})
|
18
|
+
File.new("#{@stub.app_root}/tmp/restart.txt", "w").close
|
19
|
+
File.utime(2, 2, "#{@stub.app_root}/tmp/restart.txt")
|
20
|
+
get('/').should == "changed"
|
21
|
+
end
|
22
|
+
|
23
|
+
if Process.uid == 0
|
24
|
+
it "runs as an unprivileged user" do
|
25
|
+
File.prepend("#{@stub.app_root}/config.ru", %q{
|
26
|
+
File.new('foo.txt', 'w').close
|
27
|
+
})
|
28
|
+
File.new("#{@stub.app_root}/tmp/restart.txt", "w").close
|
29
|
+
File.utime(1, 1, "#{@stub.app_root}/tmp/restart.txt")
|
30
|
+
get('/')
|
31
|
+
stat = File.stat("#{@stub.app_root}/foo.txt")
|
32
|
+
stat.uid.should_not == 0
|
33
|
+
stat.gid.should_not == 0
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
shared_examples_for "HelloWorld WSGI application" do
|
2
|
+
after :each do
|
3
|
+
File.unlink("#{@stub.app_root}/passenger_wsgi.pyc") rescue nil
|
4
|
+
end
|
5
|
+
|
6
|
+
it "is possible to fetch static assets" do
|
7
|
+
get('/wsgi-snake.jpg').should == @stub.public_file('wsgi-snake.jpg')
|
8
|
+
end
|
9
|
+
|
10
|
+
it "is possible to GET a regular WSGI page" do
|
11
|
+
get('/').should =~ /Hello World/
|
12
|
+
end
|
13
|
+
|
14
|
+
it "supports restarting via restart.txt" do
|
15
|
+
get('/').should =~ /Hello World/
|
16
|
+
|
17
|
+
code = %q{
|
18
|
+
def application(env, start_response):
|
19
|
+
start_response('200 OK', [('Content-Type', 'text/html')])
|
20
|
+
return ["changed"]
|
21
|
+
}.gsub(/^\t\t\t/, '')
|
22
|
+
|
23
|
+
File.write("#{@stub.app_root}/passenger_wsgi.py", code)
|
24
|
+
File.new("#{@stub.app_root}/tmp/restart.txt", "w").close
|
25
|
+
File.utime(2, 2, "#{@stub.app_root}/tmp/restart.txt")
|
26
|
+
get('/').should == "changed"
|
27
|
+
end
|
28
|
+
|
29
|
+
if Process.uid == 0
|
30
|
+
it "runs as an unprivileged user" do
|
31
|
+
File.prepend("#{@stub.app_root}/passenger_wsgi.py",
|
32
|
+
"file('foo.txt', 'w').close()\n")
|
33
|
+
File.new("#{@stub.app_root}/tmp/restart.txt", "w").close
|
34
|
+
File.utime(1, 1, "#{@stub.app_root}/tmp/restart.txt")
|
35
|
+
get('/')
|
36
|
+
stat = File.stat("#{@stub.app_root}/foo.txt")
|
37
|
+
stat.uid.should_not == 0
|
38
|
+
stat.gid.should_not == 0
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,192 @@
|
|
1
|
+
shared_examples_for "MyCook(tm) beta" do
|
2
|
+
it "is possible to fetch static assets" do
|
3
|
+
get('/images/rails.png').should == @stub.public_file('images/rails.png')
|
4
|
+
end
|
5
|
+
|
6
|
+
it "supports page caching on file URIs" do
|
7
|
+
get('/welcome/cached').should =~ %r{This is the cached version of /welcome/cached}
|
8
|
+
end
|
9
|
+
|
10
|
+
it "supports page caching on directory URIs" do
|
11
|
+
get('/uploads').should =~ %r{This is the cached version of /uploads}
|
12
|
+
end
|
13
|
+
|
14
|
+
it "supports page caching on root/base URIs" do
|
15
|
+
begin
|
16
|
+
File.write("#{@stub.app_root}/public/index.html", "This is index.html.")
|
17
|
+
get('/').should == "This is index.html."
|
18
|
+
ensure
|
19
|
+
File.unlink("#{@stub.app_root}/public/index.html") rescue nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
it "doesn't use page caching if the HTTP request is not GET" do
|
24
|
+
post('/welcome/cached').should =~ %r{This content should never be displayed}
|
25
|
+
end
|
26
|
+
|
27
|
+
it "isn't interfered by Rails's default .htaccess dispatcher rules" do
|
28
|
+
get('/welcome/in_passenger').should == 'true'
|
29
|
+
end
|
30
|
+
|
31
|
+
it "is possible to GET a regular Rails page" do
|
32
|
+
get('/').should =~ /Welcome to MyCook/
|
33
|
+
end
|
34
|
+
|
35
|
+
it "is possible to pass GET parameters to a Rails page" do
|
36
|
+
result = get('/welcome/parameters_test?hello=world&recipe[name]=Green+Bananas')
|
37
|
+
result.should =~ %r{<hello>world</hello>}
|
38
|
+
result.should =~ %r{<recipe>}
|
39
|
+
result.should =~ %r{<name>Green Bananas</name>}
|
40
|
+
end
|
41
|
+
|
42
|
+
it "is possible to POST to a Rails page" do
|
43
|
+
result = post('/recipes', {
|
44
|
+
'recipe[name]' => 'Banana Pancakes',
|
45
|
+
'recipe[instructions]' => 'Call 0900-BANANAPANCAKES'
|
46
|
+
})
|
47
|
+
result.should =~ %r{HTTP method: post}
|
48
|
+
result.should =~ %r{Name: Banana Pancakes}
|
49
|
+
result.should =~ %r{Instructions: Call 0900-BANANAPANCAKES}
|
50
|
+
end
|
51
|
+
|
52
|
+
it "is possible to upload a file" do
|
53
|
+
rails_png = File.open("#{@stub.app_root}/public/images/rails.png", 'rb')
|
54
|
+
params = {
|
55
|
+
'upload[name1]' => 'Kotonoha',
|
56
|
+
'upload[name2]' => 'Sekai',
|
57
|
+
'upload[data]' => rails_png
|
58
|
+
}
|
59
|
+
begin
|
60
|
+
response = post('/uploads', params)
|
61
|
+
rails_png.rewind
|
62
|
+
response.should ==
|
63
|
+
"name 1 = Kotonoha\n" <<
|
64
|
+
"name 2 = Sekai\n" <<
|
65
|
+
"data = " << rails_png.read
|
66
|
+
ensure
|
67
|
+
rails_png.close
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
it "supports HTTP POST with 'chunked' transfer encoding" do
|
72
|
+
if !@web_server_supports_chunked_transfer_encoding
|
73
|
+
# Nginx doesn't support 'chunked' transfer encoding for uploads.
|
74
|
+
return pending
|
75
|
+
end
|
76
|
+
|
77
|
+
uri = URI.parse(@server)
|
78
|
+
base_uri = uri.path.sub(%r(/$), '')
|
79
|
+
socket = TCPSocket.new(uri.host, uri.port)
|
80
|
+
begin
|
81
|
+
socket.write("POST #{base_uri}/uploads/single HTTP/1.1\r\n")
|
82
|
+
socket.write("Host: #{uri.host}\r\n")
|
83
|
+
socket.write("Transfer-Encoding: chunked\r\n")
|
84
|
+
socket.write("\r\n")
|
85
|
+
|
86
|
+
chunk = "foo=bar!"
|
87
|
+
socket.write("%X\r\n%s\r\n" % [chunk.size, chunk])
|
88
|
+
socket.write("0\r\n")
|
89
|
+
socket.close_write
|
90
|
+
|
91
|
+
lines = socket.read.split(/\r?\n/)
|
92
|
+
lines.last.should == "bar!"
|
93
|
+
ensure
|
94
|
+
socket.close
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
it "can properly handle custom headers" do
|
99
|
+
response = get_response('/welcome/headers_test')
|
100
|
+
response["X-Foo"].should == "Bar"
|
101
|
+
end
|
102
|
+
|
103
|
+
it "supports %2f in URIs" do
|
104
|
+
get('/welcome/show_id/foo%2fbar').should == 'foo/bar'
|
105
|
+
end
|
106
|
+
|
107
|
+
it "has AbstractRequest which returns a request_uri without hostname, with query_string" do
|
108
|
+
get('/welcome/request_uri?foo=bar%20escaped').should =~ %r{/welcome/request_uri\?foo=bar%20escaped}
|
109
|
+
end
|
110
|
+
|
111
|
+
it "supports restarting via restart.txt" do
|
112
|
+
begin
|
113
|
+
controller = "#{@stub.app_root}/app/controllers/test_controller.rb"
|
114
|
+
restart_file = "#{@stub.app_root}/tmp/restart.txt"
|
115
|
+
now = Time.now
|
116
|
+
|
117
|
+
File.open(controller, 'w') do |f|
|
118
|
+
f.write %q{
|
119
|
+
class TestController < ApplicationController
|
120
|
+
layout nil
|
121
|
+
def index
|
122
|
+
render :text => "foo"
|
123
|
+
end
|
124
|
+
end
|
125
|
+
}
|
126
|
+
end
|
127
|
+
File.open(restart_file, 'w').close
|
128
|
+
File.utime(now - 10, now - 10, restart_file)
|
129
|
+
get('/test').should == "foo"
|
130
|
+
|
131
|
+
File.open(controller, 'w') do |f|
|
132
|
+
f.write %q{
|
133
|
+
class TestController < ApplicationController
|
134
|
+
layout nil
|
135
|
+
def index
|
136
|
+
render :text => "bar"
|
137
|
+
end
|
138
|
+
end
|
139
|
+
}
|
140
|
+
end
|
141
|
+
|
142
|
+
File.utime(now - 5, now - 5, restart_file)
|
143
|
+
get('/test').should == 'bar'
|
144
|
+
ensure
|
145
|
+
File.unlink(controller) rescue nil
|
146
|
+
File.unlink(restart_file) rescue nil
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
it "does not make the web server crash if the app crashes" do
|
151
|
+
post('/welcome/terminate')
|
152
|
+
sleep(0.25) # Give the app the time to terminate itself.
|
153
|
+
get('/').should =~ /Welcome to MyCook/
|
154
|
+
end
|
155
|
+
|
156
|
+
it "does not conflict with Phusion Passenger if there's a model named 'Passenger'" do
|
157
|
+
Dir.mkdir("#{@stub.app_root}/app/models") rescue nil
|
158
|
+
File.open("#{@stub.app_root}/app/models/passenger.rb", 'w') do |f|
|
159
|
+
f.write(%q{
|
160
|
+
class Passenger
|
161
|
+
def name
|
162
|
+
return "Gourry Gabriev"
|
163
|
+
end
|
164
|
+
end
|
165
|
+
})
|
166
|
+
end
|
167
|
+
begin
|
168
|
+
system "touch '#{@stub.app_root}/tmp/restart.txt'"
|
169
|
+
get('/welcome/passenger_name').should == 'Gourry Gabriev'
|
170
|
+
ensure
|
171
|
+
File.unlink("#{@stub.app_root}/app/models/passenger.rb") rescue nil
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
it "sets the 'Status' header" do
|
176
|
+
response = get_response('/nonexistant')
|
177
|
+
response["Status"].should == "404 Not Found"
|
178
|
+
end
|
179
|
+
|
180
|
+
if Process.uid == 0
|
181
|
+
it "runs as an unprivileged user" do
|
182
|
+
post('/welcome/touch')
|
183
|
+
begin
|
184
|
+
stat = File.stat("#{@stub.app_root}/public/touch.txt")
|
185
|
+
stat.uid.should_not == 0
|
186
|
+
stat.gid.should_not == 0
|
187
|
+
ensure
|
188
|
+
File.unlink("#{@stub.app_root}/public/touch.txt") rescue nil
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
require 'support/config'
|
2
|
+
require 'support/test_helper'
|
3
|
+
require 'support/nginx_controller'
|
4
|
+
|
5
|
+
require 'integration_tests/mycook_spec'
|
6
|
+
require 'integration_tests/hello_world_rack_spec'
|
7
|
+
require 'integration_tests/hello_world_wsgi_spec'
|
8
|
+
|
9
|
+
describe "Phusion Passenger for Nginx" do
|
10
|
+
include TestHelper
|
11
|
+
|
12
|
+
before :all do
|
13
|
+
if !CONFIG['nginx']
|
14
|
+
STDERR.puts "*** ERROR: You must set the 'nginx' config option in test/config.yml."
|
15
|
+
exit!(1)
|
16
|
+
end
|
17
|
+
|
18
|
+
check_hosts_configuration
|
19
|
+
@nginx = NginxController.new("tmp.nginx")
|
20
|
+
if Process.uid == 0
|
21
|
+
@nginx.set(
|
22
|
+
:www_user => CONFIG['normal_user_1'],
|
23
|
+
:www_group => Etc.getgrgid(Etc.getpwnam(CONFIG['normal_user_1']).gid).name
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
FileUtils.mkdir_p("tmp.nginx")
|
28
|
+
end
|
29
|
+
|
30
|
+
after :all do
|
31
|
+
begin
|
32
|
+
@nginx.stop
|
33
|
+
ensure
|
34
|
+
FileUtils.rm_rf("tmp.nginx")
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
describe "MyCook(tm) beta running a root URI" do
|
40
|
+
before :all do
|
41
|
+
@server = "http://passenger.test:#{@nginx.port}"
|
42
|
+
@stub = setup_rails_stub('mycook')
|
43
|
+
@nginx.add_server do |server|
|
44
|
+
server[:server_name] = "passenger.test"
|
45
|
+
server[:root] = File.expand_path("#{@stub.app_root}/public")
|
46
|
+
end
|
47
|
+
@nginx.start
|
48
|
+
end
|
49
|
+
|
50
|
+
after :all do
|
51
|
+
@stub.destroy
|
52
|
+
end
|
53
|
+
|
54
|
+
it_should_behave_like "MyCook(tm) beta"
|
55
|
+
end
|
56
|
+
|
57
|
+
describe "MyCook(tm) beta running in a sub-URI" do
|
58
|
+
before :all do
|
59
|
+
@stub = setup_rails_stub('mycook')
|
60
|
+
FileUtils.rm_rf('tmp.webdir')
|
61
|
+
FileUtils.mkdir_p('tmp.webdir')
|
62
|
+
FileUtils.cp_r('stub/zsfa/.', 'tmp.webdir')
|
63
|
+
FileUtils.ln_sf(File.expand_path(@stub.app_root) + "/public", 'tmp.webdir/mycook')
|
64
|
+
|
65
|
+
@nginx.add_server do |server|
|
66
|
+
server[:server_name] = "passenger.test"
|
67
|
+
server[:root] = File.expand_path("tmp.webdir")
|
68
|
+
server[:passenger_base_uri] = "/mycook"
|
69
|
+
end
|
70
|
+
@nginx.start
|
71
|
+
end
|
72
|
+
|
73
|
+
after :all do
|
74
|
+
FileUtils.rm_rf('tmp.webdir')
|
75
|
+
@stub.destroy
|
76
|
+
end
|
77
|
+
|
78
|
+
before :each do
|
79
|
+
@server = "http://passenger.test:#{@nginx.port}/mycook"
|
80
|
+
end
|
81
|
+
|
82
|
+
it_should_behave_like "MyCook(tm) beta"
|
83
|
+
|
84
|
+
it "does not interfere with the root website" do
|
85
|
+
@server = "http://passenger.test:#{@nginx.port}"
|
86
|
+
get('/').should =~ /Zed, you rock\!/
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
|
91
|
+
##### Helper methods #####
|
92
|
+
|
93
|
+
def start_web_server_if_necessary
|
94
|
+
if !@nginx.running?
|
95
|
+
@nginx.start
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -34,6 +34,46 @@ describe PhusionPassenger::Rack::ApplicationSpawner do
|
|
34
34
|
config_ru_owner.should == touch_txt_owner
|
35
35
|
end if Process.euid == 0
|
36
36
|
|
37
|
+
it "calls the starting_worker_process event after config.ru has been loaded" do
|
38
|
+
File.append("#{@stub.app_root}/config.ru", %q{
|
39
|
+
PhusionPassenger.on_event(:starting_worker_process) do
|
40
|
+
File.append("rackresult.txt", "worker_process_started\n")
|
41
|
+
end
|
42
|
+
File.append("rackresult.txt", "end of config.ru\n");
|
43
|
+
})
|
44
|
+
spawn(@stub.app_root).close
|
45
|
+
spawn(@stub.app_root).close
|
46
|
+
|
47
|
+
# Give some time for the starting_worker_process hook to be executed.
|
48
|
+
sleep 0.2
|
49
|
+
|
50
|
+
contents = File.read("#{@stub.app_root}/rackresult.txt")
|
51
|
+
contents.should == "end of config.ru\n" +
|
52
|
+
"worker_process_started\n" +
|
53
|
+
"end of config.ru\n" +
|
54
|
+
"worker_process_started\n"
|
55
|
+
end
|
56
|
+
|
57
|
+
it "calls the stopping_worker_process event" do
|
58
|
+
File.append("#{@stub.app_root}/config.ru", %q{
|
59
|
+
PhusionPassenger.on_event(:stopping_worker_process) do
|
60
|
+
File.append("rackresult.txt", "worker_process_stopped\n")
|
61
|
+
end
|
62
|
+
File.append("rackresult.txt", "end of config.ru\n");
|
63
|
+
})
|
64
|
+
spawn(@stub.app_root).close
|
65
|
+
spawn(@stub.app_root).close
|
66
|
+
|
67
|
+
# Give some time for the starting_worker_process hook to be executed.
|
68
|
+
sleep 0.2
|
69
|
+
|
70
|
+
contents = File.read("#{@stub.app_root}/rackresult.txt")
|
71
|
+
contents.should == "end of config.ru\n" +
|
72
|
+
"worker_process_stopped\n" +
|
73
|
+
"end of config.ru\n" +
|
74
|
+
"worker_process_stopped\n"
|
75
|
+
end
|
76
|
+
|
37
77
|
def spawn(app_root)
|
38
78
|
PhusionPassenger::Rack::ApplicationSpawner.spawn_application(app_root,
|
39
79
|
"lowest_user" => CONFIG['lowest_user'])
|
@@ -0,0 +1,109 @@
|
|
1
|
+
|
2
|
+
# This map is not a full koi8-r <> utf8 map: it does not contain
|
3
|
+
# box-drawing and some other characters. Besides this map contains
|
4
|
+
# several koi8-u and Byelorussian letters which are not in koi8-r.
|
5
|
+
# If you need a full and standard map, use contrib/unicode2nginx/koi-utf
|
6
|
+
# map instead.
|
7
|
+
|
8
|
+
charset_map koi8-r utf-8 {
|
9
|
+
|
10
|
+
80 E282AC ; # euro
|
11
|
+
|
12
|
+
95 E280A2 ; # bullet
|
13
|
+
|
14
|
+
9A C2A0 ; #
|
15
|
+
|
16
|
+
9E C2B7 ; # ·
|
17
|
+
|
18
|
+
A3 D191 ; # small yo
|
19
|
+
A4 D194 ; # small Ukrainian ye
|
20
|
+
|
21
|
+
A6 D196 ; # small Ukrainian i
|
22
|
+
A7 D197 ; # small Ukrainian yi
|
23
|
+
|
24
|
+
AD D291 ; # small Ukrainian soft g
|
25
|
+
AE D19E ; # small Byelorussian short u
|
26
|
+
|
27
|
+
B0 C2B0 ; # °
|
28
|
+
|
29
|
+
B3 D081 ; # capital YO
|
30
|
+
B4 D084 ; # capital Ukrainian YE
|
31
|
+
|
32
|
+
B6 D086 ; # capital Ukrainian I
|
33
|
+
B7 D087 ; # capital Ukrainian YI
|
34
|
+
|
35
|
+
B9 E28496 ; # numero sign
|
36
|
+
|
37
|
+
BD D290 ; # capital Ukrainian soft G
|
38
|
+
BE D18E ; # capital Byelorussian short U
|
39
|
+
|
40
|
+
BF C2A9 ; # (C)
|
41
|
+
|
42
|
+
C0 D18E ; # small yu
|
43
|
+
C1 D0B0 ; # small a
|
44
|
+
C2 D0B1 ; # small b
|
45
|
+
C3 D186 ; # small ts
|
46
|
+
C4 D0B4 ; # small d
|
47
|
+
C5 D0B5 ; # small ye
|
48
|
+
C6 D184 ; # small f
|
49
|
+
C7 D0B3 ; # small g
|
50
|
+
C8 D185 ; # small kh
|
51
|
+
C9 D0B8 ; # small i
|
52
|
+
CA D0B9 ; # small j
|
53
|
+
CB D0BA ; # small k
|
54
|
+
CC D0BB ; # small l
|
55
|
+
CD D0BC ; # small m
|
56
|
+
CE D0BD ; # small n
|
57
|
+
CF D0BE ; # small o
|
58
|
+
|
59
|
+
D0 D0BF ; # small p
|
60
|
+
D1 D18F ; # small ya
|
61
|
+
D2 D180 ; # small r
|
62
|
+
D3 D181 ; # small s
|
63
|
+
D4 D182 ; # small t
|
64
|
+
D5 D183 ; # small u
|
65
|
+
D6 D0B6 ; # small zh
|
66
|
+
D7 D0B2 ; # small v
|
67
|
+
D8 D18C ; # small soft sign
|
68
|
+
D9 D18B ; # small y
|
69
|
+
DA D0B7 ; # small z
|
70
|
+
DB D188 ; # small sh
|
71
|
+
DC D18D ; # small e
|
72
|
+
DD D189 ; # small shch
|
73
|
+
DE D187 ; # small ch
|
74
|
+
DF D18A ; # small hard sign
|
75
|
+
|
76
|
+
E0 D0AE ; # capital YU
|
77
|
+
E1 D090 ; # capital A
|
78
|
+
E2 D091 ; # capital B
|
79
|
+
E3 D0A6 ; # capital TS
|
80
|
+
E4 D094 ; # capital D
|
81
|
+
E5 D095 ; # capital YE
|
82
|
+
E6 D0A4 ; # capital F
|
83
|
+
E7 D093 ; # capital G
|
84
|
+
E8 D0A5 ; # capital KH
|
85
|
+
E9 D098 ; # capital I
|
86
|
+
EA D099 ; # capital J
|
87
|
+
EB D09A ; # capital K
|
88
|
+
EC D09B ; # capital L
|
89
|
+
ED D09C ; # capital M
|
90
|
+
EE D09D ; # capital N
|
91
|
+
EF D09E ; # capital O
|
92
|
+
|
93
|
+
F0 D09F ; # capital P
|
94
|
+
F1 D0AF ; # capital YA
|
95
|
+
F2 D0A0 ; # capital R
|
96
|
+
F3 D0A1 ; # capital S
|
97
|
+
F4 D0A2 ; # capital T
|
98
|
+
F5 D0A3 ; # capital U
|
99
|
+
F6 D096 ; # capital ZH
|
100
|
+
F7 D092 ; # capital V
|
101
|
+
F8 D0AC ; # capital soft sign
|
102
|
+
F9 D0AB ; # capital Y
|
103
|
+
FA D097 ; # capital Z
|
104
|
+
FB D0A8 ; # capital SH
|
105
|
+
FC D0AD ; # capital E
|
106
|
+
FD D0A9 ; # capital SHCH
|
107
|
+
FE D0A7 ; # capital CH
|
108
|
+
FF D0AA ; # capital hard sign
|
109
|
+
}
|