passenger 2.2.2 → 2.2.3
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 +13 -3
- data/Rakefile +42 -33
- data/bin/passenger-install-apache2-module +1 -2
- data/bin/passenger-install-nginx-module +7 -19
- data/bin/passenger-status +64 -15
- data/bin/passenger-stress-test +2 -2
- data/doc/ApplicationPool algorithm.txt +26 -22
- data/doc/Users guide Apache.html +374 -149
- data/doc/Users guide Apache.txt +318 -51
- data/doc/Users guide Nginx.html +13 -13
- data/doc/Users guide Nginx.txt +7 -2
- data/doc/cxxapi/Bucket_8h-source.html +62 -25
- data/doc/cxxapi/Configuration_8h-source.html +343 -326
- data/doc/cxxapi/DirectoryMapper_8h-source.html +12 -12
- data/doc/cxxapi/Hooks_8h-source.html +1 -1
- data/doc/cxxapi/annotated.html +1 -1
- data/doc/cxxapi/classHooks-members.html +1 -1
- data/doc/cxxapi/classHooks.html +1 -1
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +2 -2
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +9 -9
- data/doc/cxxapi/classes.html +1 -1
- data/doc/cxxapi/definitions_8h-source.html +1 -1
- data/doc/cxxapi/files.html +1 -1
- data/doc/cxxapi/functions.html +2 -2
- data/doc/cxxapi/functions_func.html +2 -2
- data/doc/cxxapi/graph_legend.html +1 -1
- data/doc/cxxapi/group__Configuration.html +1 -1
- data/doc/cxxapi/group__Core.html +1 -1
- data/doc/cxxapi/group__Hooks.html +1 -1
- data/doc/cxxapi/group__Support.html +1 -1
- data/doc/cxxapi/main.html +1 -1
- data/doc/cxxapi/modules.html +1 -1
- data/doc/rdoc/classes/ConditionVariable.html +194 -0
- data/doc/rdoc/classes/Exception.html +120 -0
- data/doc/rdoc/classes/GC.html +113 -0
- data/doc/rdoc/classes/IO.html +169 -0
- data/doc/rdoc/classes/PhusionPassenger.html +238 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +153 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +517 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +719 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +97 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +96 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +97 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +96 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +598 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +140 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +317 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess/Instance.html +138 -0
- data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +154 -0
- data/doc/rdoc/classes/PhusionPassenger/Application.html +283 -0
- data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +172 -0
- data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +145 -0
- data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +175 -0
- data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +141 -0
- data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +489 -0
- data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +350 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack.html +91 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +188 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +194 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz.html +95 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +442 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +200 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +436 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +155 -0
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +402 -0
- data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +125 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +805 -0
- data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +140 -0
- data/doc/rdoc/classes/PhusionPassenger/WSGI.html +89 -0
- data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +188 -0
- data/doc/rdoc/classes/PlatformInfo.html +831 -0
- data/doc/rdoc/classes/RakeExtensions.html +197 -0
- data/doc/rdoc/classes/Signal.html +131 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/DEVELOPERS_TXT.html +255 -0
- data/doc/rdoc/files/README.html +157 -0
- data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +92 -0
- 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 +131 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +130 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +130 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +134 -0
- data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +133 -0
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +143 -0
- data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +145 -0
- data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +161 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +175 -0
- data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +129 -0
- data/doc/rdoc/files/misc/rake/extensions_rb.html +130 -0
- data/doc/rdoc/fr_class_index.html +90 -0
- data/doc/rdoc/fr_file_index.html +76 -0
- data/doc/rdoc/fr_method_index.html +200 -0
- data/doc/rdoc/index.html +26 -0
- data/doc/rdoc/rdoc-style.css +187 -0
- data/doc/users_guide_snippets/rackup_specifications.txt +2 -8
- data/ext/apache2/Bucket.cpp +71 -38
- data/ext/apache2/Bucket.h +53 -16
- data/ext/apache2/Configuration.cpp +15 -0
- data/ext/apache2/Configuration.h +19 -2
- data/ext/apache2/DirectoryMapper.h +10 -10
- data/ext/apache2/Hooks.cpp +334 -74
- data/ext/boost/mpl/apply.hpp +5 -1
- data/ext/boost/mpl/apply_wrap.hpp +5 -2
- data/ext/boost/mpl/aux_/full_lambda.hpp +5 -1
- data/ext/boost/mpl/bind.hpp +5 -1
- data/ext/common/Application.h +11 -31
- data/ext/common/ApplicationPool.h +2 -1
- data/ext/common/ApplicationPoolServer.h +61 -20
- data/ext/common/ApplicationPoolServerExecutable.cpp +132 -4
- data/ext/common/ApplicationPoolStatusReporter.h +189 -65
- data/ext/common/Base64.cpp +143 -0
- data/ext/common/Base64.h +57 -0
- data/ext/common/CachedFileStat.cpp +25 -82
- data/ext/common/CachedFileStat.h +11 -125
- data/ext/common/CachedFileStat.hpp +243 -0
- data/ext/common/Exceptions.h +13 -0
- data/ext/common/FileChangeChecker.h +209 -0
- data/ext/common/Logging.h +3 -2
- data/ext/common/MessageChannel.h +10 -10
- data/ext/common/PoolOptions.h +72 -5
- data/ext/common/SpawnManager.h +11 -8
- data/ext/common/StandardApplicationPool.h +38 -39
- data/ext/common/StaticString.h +1 -0
- data/ext/common/StringListCreator.h +83 -0
- data/ext/common/SystemTime.h +3 -2
- data/ext/common/Timer.h +88 -0
- data/ext/common/Utils.cpp +161 -42
- data/ext/common/Utils.h +62 -31
- data/ext/common/Version.h +1 -1
- data/ext/nginx/Configuration.c +0 -4
- data/ext/nginx/ContentHandler.c +8 -6
- data/ext/nginx/HelperServer.cpp +45 -55
- data/ext/nginx/HttpStatusExtractor.h +4 -0
- data/ext/nginx/StaticContentHandler.c +25 -5
- data/ext/nginx/config +3 -0
- data/ext/nginx/ngx_http_passenger_module.c +72 -17
- data/ext/nginx/ngx_http_passenger_module.h +2 -2
- data/lib/phusion_passenger/abstract_request_handler.rb +15 -7
- data/lib/phusion_passenger/abstract_server.rb +16 -2
- data/lib/phusion_passenger/admin_tools/control_process.rb +36 -25
- data/lib/phusion_passenger/constants.rb +1 -1
- data/lib/phusion_passenger/dependencies.rb +10 -0
- data/lib/phusion_passenger/platform_info.rb +1 -1
- data/lib/phusion_passenger/rack/application_spawner.rb +21 -2
- data/lib/phusion_passenger/rack/request_handler.rb +10 -0
- data/lib/phusion_passenger/railz/application_spawner.rb +38 -2
- data/lib/phusion_passenger/railz/framework_spawner.rb +26 -28
- data/lib/phusion_passenger/railz/request_handler.rb +5 -1
- data/lib/phusion_passenger/spawn_manager.rb +6 -2
- data/lib/phusion_passenger/utils.rb +79 -27
- data/misc/rake/cplusplus.rb +5 -5
- data/test/ApplicationPoolServerTest.cpp +42 -0
- data/test/ApplicationPoolTest.cpp +255 -267
- data/test/Base64Test.cpp +48 -0
- data/test/CachedFileStatTest.cpp +243 -103
- data/test/FileChangeCheckerTest.cpp +331 -0
- data/test/PoolOptionsTest.cpp +80 -0
- data/test/UtilsTest.cpp +5 -17
- data/test/integration_tests/apache2_tests.rb +15 -4
- data/test/integration_tests/mycook_spec.rb +3 -4
- data/test/oxt/syscall_interruption_test.cpp +2 -14
- data/test/ruby/abstract_server_collection_spec.rb +1 -1
- data/test/ruby/abstract_server_spec.rb +35 -1
- data/test/ruby/rack/application_spawner_spec.rb +23 -6
- data/test/ruby/rails/application_spawner_spec.rb +6 -6
- data/test/ruby/rails/framework_spawner_spec.rb +6 -5
- data/test/ruby/rails/minimal_spawner_spec.rb +19 -0
- data/test/ruby/rails/spawner_error_handling_spec.rb +62 -7
- data/test/ruby/spawn_manager_spec.rb +10 -7
- data/test/ruby/spawn_server_spec.rb +1 -1
- data/test/ruby/utils_spec.rb +193 -20
- data/test/ruby/wsgi/application_spawner_spec.rb +3 -1
- data/test/stub/apache2/httpd.conf.erb +3 -0
- data/test/stub/rack/config.ru +1 -1
- data/test/stub/rails_apps/mycook/app/controllers/welcome_controller.rb +8 -0
- data/test/support/Support.cpp +84 -0
- data/test/support/Support.h +66 -8
- data/test/support/config.rb +14 -2
- data/test/support/test_helper.rb +5 -0
- data/vendor/rack-1.0.0-git/lib/rack/auth/openid.rb +123 -116
- data/vendor/rack-1.0.0-git/lib/rack/cascade.rb +17 -12
- data/vendor/rack-1.0.0-git/lib/rack/commonlogger.rb +34 -43
- data/vendor/rack-1.0.0-git/lib/rack/handler/cgi.rb +1 -1
- data/vendor/rack-1.0.0-git/lib/rack/handler/fastcgi.rb +1 -1
- data/vendor/rack-1.0.0-git/lib/rack/handler/lsws.rb +1 -1
- data/vendor/rack-1.0.0-git/lib/rack/handler/mongrel.rb +1 -1
- data/vendor/rack-1.0.0-git/lib/rack/handler/scgi.rb +1 -1
- data/vendor/rack-1.0.0-git/lib/rack/handler/webrick.rb +1 -1
- data/vendor/rack-1.0.0-git/lib/rack/mock.rb +4 -17
- data/vendor/rack-1.0.0-git/lib/rack/request.rb +3 -9
- data/vendor/rack-1.0.0-git/lib/rack/rewindable_input.rb +2 -0
- data/vendor/rack-1.0.0-git/lib/rack/utils.rb +38 -12
- metadata +231 -186
- data/ext/common/FileChecker.h +0 -112
- data/test/FileCheckerTest.cpp +0 -79
- data/test/stub/minimal-railsapp/README +0 -3
- data/test/stub/minimal-railsapp/config/application.rb +0 -0
- data/test/stub/minimal-railsapp/config/environment.rb +0 -3
- data/test/stub/minimal-railsapp/vendor/rails/actionmailer/lib/action_mailer.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/actionpack/lib/action_controller.rb +0 -10
- data/test/stub/minimal-railsapp/vendor/rails/actionpack/lib/action_pack.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/actionpack/lib/action_view.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/activerecord/lib/active_record.rb +0 -7
- data/test/stub/minimal-railsapp/vendor/rails/activeresource/lib/active_resource.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/activesupport/lib/active_support.rb +0 -17
- data/test/stub/minimal-railsapp/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/railties/lib/dispatcher.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/railties/lib/initializer.rb +0 -8
- data/test/stub/minimal-railsapp/vendor/rails/railties/lib/ruby_version_check.rb +0 -1
- data/test/stub/railsapp/app/controllers/application.rb +0 -12
- data/test/stub/railsapp/app/controllers/bar_controller.rb +0 -5
- data/test/stub/railsapp/app/controllers/bar_controller_1.txt +0 -5
- data/test/stub/railsapp/app/controllers/bar_controller_2.txt +0 -5
- data/test/stub/railsapp/app/controllers/foo_controller.rb +0 -9
- data/test/stub/railsapp/app/helpers/application_helper.rb +0 -3
- data/test/stub/railsapp/config/boot.rb +0 -108
- data/test/stub/railsapp/config/database.yml +0 -19
- data/test/stub/railsapp/config/environment.rb +0 -59
- data/test/stub/railsapp/config/environments/development.rb +0 -18
- data/test/stub/railsapp/config/environments/production.rb +0 -19
- data/test/stub/railsapp/config/initializers/inflections.rb +0 -10
- data/test/stub/railsapp/config/initializers/mime_types.rb +0 -5
- data/test/stub/railsapp/config/routes.rb +0 -35
- data/test/stub/railsapp/public/useless.txt +0 -1
- data/test/stub/railsapp2/app/controllers/application.rb +0 -12
- data/test/stub/railsapp2/app/controllers/foo_controller.rb +0 -5
- data/test/stub/railsapp2/app/helpers/application_helper.rb +0 -3
- data/test/stub/railsapp2/config/boot.rb +0 -108
- data/test/stub/railsapp2/config/database.yml +0 -19
- data/test/stub/railsapp2/config/environment.rb +0 -59
- data/test/stub/railsapp2/config/environments/development.rb +0 -18
- data/test/stub/railsapp2/config/environments/production.rb +0 -19
- data/test/stub/railsapp2/config/initializers/inflections.rb +0 -10
- data/test/stub/railsapp2/config/initializers/mime_types.rb +0 -5
- data/test/stub/railsapp2/config/routes.rb +0 -35
- data/test/stub/railsapp2/public/useless.txt +0 -1
@@ -52,7 +52,7 @@
|
|
52
52
|
<a name="l00031"></a>00031
|
53
53
|
<a name="l00032"></a>00032 <span class="preprocessor">#include <oxt/backtrace.hpp></span>
|
54
54
|
<a name="l00033"></a>00033
|
55
|
-
<a name="l00034"></a>00034 <span class="preprocessor">#include "CachedFileStat.
|
55
|
+
<a name="l00034"></a>00034 <span class="preprocessor">#include "CachedFileStat.hpp"</span>
|
56
56
|
<a name="l00035"></a>00035 <span class="preprocessor">#include "Configuration.h"</span>
|
57
57
|
<a name="l00036"></a>00036 <span class="preprocessor">#include "Utils.h"</span>
|
58
58
|
<a name="l00037"></a>00037
|
@@ -87,7 +87,7 @@
|
|
87
87
|
<a name="l00066"></a>00066 <span class="keyword">private</span>:
|
88
88
|
<a name="l00067"></a>00067 DirConfig *config;
|
89
89
|
<a name="l00068"></a>00068 request_rec *r;
|
90
|
-
<a name="l00069"></a>00069
|
90
|
+
<a name="l00069"></a>00069 CachedFileStat *cstat;
|
91
91
|
<a name="l00070"></a>00070 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> throttleRate;
|
92
92
|
<a name="l00071"></a>00071 <span class="keywordtype">bool</span> baseURIKnown;
|
93
93
|
<a name="l00072"></a>00072 <span class="keyword">const</span> <span class="keywordtype">char</span> *baseURI;
|
@@ -112,16 +112,16 @@
|
|
112
112
|
<a name="l00091"></a>00091 <span class="comment"> /**</span>
|
113
113
|
<a name="l00092"></a>00092 <span class="comment"> * Create a new DirectoryMapper object.</span>
|
114
114
|
<a name="l00093"></a>00093 <span class="comment"> *</span>
|
115
|
-
<a name="l00094"></a>00094 <span class="comment"> * @param
|
116
|
-
<a name="l00095"></a>00095 <span class="comment"> * @param throttleRate A throttling rate for
|
115
|
+
<a name="l00094"></a>00094 <span class="comment"> * @param cstat A CachedFileStat object used for statting files.</span>
|
116
|
+
<a name="l00095"></a>00095 <span class="comment"> * @param throttleRate A throttling rate for cstat.</span>
|
117
117
|
<a name="l00096"></a>00096 <span class="comment"> * @warning Do not use this object after the destruction of <tt>r</tt>,</span>
|
118
|
-
<a name="l00097"></a>00097 <span class="comment"> * <tt>config</tt> or <tt>
|
118
|
+
<a name="l00097"></a>00097 <span class="comment"> * <tt>config</tt> or <tt>cstat</tt>.</span>
|
119
119
|
<a name="l00098"></a>00098 <span class="comment"> */</span>
|
120
|
-
<a name="l00099"></a><a class="code" href="classPassenger_1_1DirectoryMapper.html#
|
121
|
-
<a name="l00100"></a>00100
|
120
|
+
<a name="l00099"></a><a class="code" href="classPassenger_1_1DirectoryMapper.html#eccfaf22dab9e78299309ea366b7447b">00099</a> <a class="code" href="classPassenger_1_1DirectoryMapper.html#eccfaf22dab9e78299309ea366b7447b" title="Create a new DirectoryMapper object.">DirectoryMapper</a>(request_rec *r, DirConfig *config,
|
121
|
+
<a name="l00100"></a>00100 CachedFileStat *cstat, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> throttleRate) {
|
122
122
|
<a name="l00101"></a>00101 this->r = r;
|
123
123
|
<a name="l00102"></a>00102 this->config = config;
|
124
|
-
<a name="l00103"></a>00103 this->
|
124
|
+
<a name="l00103"></a>00103 this->cstat = cstat;
|
125
125
|
<a name="l00104"></a>00104 this->throttleRate = throttleRate;
|
126
126
|
<a name="l00105"></a>00105 appType = NONE;
|
127
127
|
<a name="l00106"></a>00106 baseURIKnown = <span class="keyword">false</span>;
|
@@ -192,7 +192,7 @@
|
|
192
192
|
<a name="l00171"></a>00171
|
193
193
|
<a name="l00172"></a>00172 UPDATE_TRACE_POINT();
|
194
194
|
<a name="l00173"></a>00173 <span class="keywordflow">if</span> (shouldAutoDetectRails()
|
195
|
-
<a name="l00174"></a>00174 && verifyRailsDir(config->getAppRoot(ap_document_root(r)),
|
195
|
+
<a name="l00174"></a>00174 && verifyRailsDir(config->getAppRoot(ap_document_root(r)), cstat, throttleRate)) {
|
196
196
|
<a name="l00175"></a>00175 baseURIKnown = <span class="keyword">true</span>;
|
197
197
|
<a name="l00176"></a>00176 baseURI = <span class="stringliteral">"/"</span>;
|
198
198
|
<a name="l00177"></a>00177 appType = RAILS;
|
@@ -201,7 +201,7 @@
|
|
201
201
|
<a name="l00180"></a>00180
|
202
202
|
<a name="l00181"></a>00181 UPDATE_TRACE_POINT();
|
203
203
|
<a name="l00182"></a>00182 <span class="keywordflow">if</span> (shouldAutoDetectRack()
|
204
|
-
<a name="l00183"></a>00183 && verifyRackDir(config->getAppRoot(ap_document_root(r)),
|
204
|
+
<a name="l00183"></a>00183 && verifyRackDir(config->getAppRoot(ap_document_root(r)), cstat, throttleRate)) {
|
205
205
|
<a name="l00184"></a>00184 baseURIKnown = <span class="keyword">true</span>;
|
206
206
|
<a name="l00185"></a>00185 baseURI = <span class="stringliteral">"/"</span>;
|
207
207
|
<a name="l00186"></a>00186 appType = RACK;
|
@@ -210,7 +210,7 @@
|
|
210
210
|
<a name="l00189"></a>00189
|
211
211
|
<a name="l00190"></a>00190 UPDATE_TRACE_POINT();
|
212
212
|
<a name="l00191"></a>00191 <span class="keywordflow">if</span> (shouldAutoDetectWSGI()
|
213
|
-
<a name="l00192"></a>00192 && verifyWSGIDir(config->getAppRoot(ap_document_root(r)),
|
213
|
+
<a name="l00192"></a>00192 && verifyWSGIDir(config->getAppRoot(ap_document_root(r)), cstat, throttleRate)) {
|
214
214
|
<a name="l00193"></a>00193 baseURIKnown = <span class="keyword">true</span>;
|
215
215
|
<a name="l00194"></a>00194 baseURI = <span class="stringliteral">"/"</span>;
|
216
216
|
<a name="l00195"></a>00195 appType = WSGI;
|
@@ -316,7 +316,7 @@
|
|
316
316
|
<a name="l00295"></a>00295 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_DIRECTORY_MAPPER_H_ */</span>
|
317
317
|
<a name="l00296"></a>00296
|
318
318
|
</pre></div></div>
|
319
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
319
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
320
320
|
<a href="http://www.doxygen.org/index.html">
|
321
321
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
322
322
|
</body>
|
@@ -65,7 +65,7 @@
|
|
65
65
|
<a name="l00044"></a>00044 <span class="preprocessor"></span>
|
66
66
|
<a name="l00045"></a>00045 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_HOOKS_H_ */</span>
|
67
67
|
</pre></div></div>
|
68
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
68
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
69
69
|
<a href="http://www.doxygen.org/index.html">
|
70
70
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
71
71
|
</body>
|
data/doc/cxxapi/annotated.html
CHANGED
@@ -27,7 +27,7 @@
|
|
27
27
|
<tr><td class="indexkey"><a class="el" href="classHooks.html">Hooks</a></td><td class="indexvalue">Apache hook functions, wrapped in a class </td></tr>
|
28
28
|
</table>
|
29
29
|
</div>
|
30
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
30
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
31
31
|
<a href="http://www.doxygen.org/index.html">
|
32
32
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
33
33
|
</body>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<tr class="memlist"><td><a class="el" href="classHooks.html#d6cca64be8a9075b4b92efdb4d9020a5">startBlockingModAutoIndex</a>(request_rec *r)</td><td><a class="el" href="classHooks.html">Hooks</a></td><td><code> [inline]</code></td></tr>
|
29
29
|
<tr class="memlist"><td><a class="el" href="classHooks.html#e3091c57c95b2f8269f566099802f0ec">startBlockingModDir</a>(request_rec *r)</td><td><a class="el" href="classHooks.html">Hooks</a></td><td><code> [inline]</code></td></tr>
|
30
30
|
</table></div>
|
31
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
31
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
32
32
|
<a href="http://www.doxygen.org/index.html">
|
33
33
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
34
34
|
</body>
|
data/doc/cxxapi/classHooks.html
CHANGED
@@ -148,7 +148,7 @@ So in <a class="el" href="classHooks.html#e3091c57c95b2f8269f566099802f0ec" titl
|
|
148
148
|
<hr>The documentation for this class was generated from the following file:<ul>
|
149
149
|
<li>Hooks.cpp</ul>
|
150
150
|
</div>
|
151
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
151
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
152
152
|
<a href="http://www.doxygen.org/index.html">
|
153
153
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
154
154
|
</body>
|
@@ -23,14 +23,14 @@
|
|
23
23
|
</div>
|
24
24
|
<div class="contents">
|
25
25
|
<h1>Passenger::DirectoryMapper Member List</h1>This is the complete list of members for <a class="el" href="classPassenger_1_1DirectoryMapper.html">Passenger::DirectoryMapper</a>, including all inherited members.<p><table>
|
26
|
-
<tr class="memlist"><td><a class="el" href="classPassenger_1_1DirectoryMapper.html#
|
26
|
+
<tr class="memlist"><td><a class="el" href="classPassenger_1_1DirectoryMapper.html#eccfaf22dab9e78299309ea366b7447b">DirectoryMapper</a>(request_rec *r, DirConfig *config, CachedFileStat *cstat, unsigned int throttleRate)</td><td><a class="el" href="classPassenger_1_1DirectoryMapper.html">Passenger::DirectoryMapper</a></td><td><code> [inline]</code></td></tr>
|
27
27
|
<tr class="memlist"><td><a class="el" href="classPassenger_1_1DirectoryMapper.html#ba438d86ca263972a47540956bf11ec1">getApplicationType</a>()</td><td><a class="el" href="classPassenger_1_1DirectoryMapper.html">Passenger::DirectoryMapper</a></td><td><code> [inline]</code></td></tr>
|
28
28
|
<tr class="memlist"><td><a class="el" href="classPassenger_1_1DirectoryMapper.html#c46f0e74ffd05b7fe9924dd99a057cf7">getApplicationTypeString</a>()</td><td><a class="el" href="classPassenger_1_1DirectoryMapper.html">Passenger::DirectoryMapper</a></td><td><code> [inline]</code></td></tr>
|
29
29
|
<tr class="memlist"><td><a class="el" href="classPassenger_1_1DirectoryMapper.html#2da887c077fc2460dea204783470e821">getBaseURI</a>()</td><td><a class="el" href="classPassenger_1_1DirectoryMapper.html">Passenger::DirectoryMapper</a></td><td><code> [inline]</code></td></tr>
|
30
30
|
<tr class="memlist"><td><a class="el" href="classPassenger_1_1DirectoryMapper.html#f5091e3cef3878e160e5d3b2181d82fb">getEnvironment</a>()</td><td><a class="el" href="classPassenger_1_1DirectoryMapper.html">Passenger::DirectoryMapper</a></td><td><code> [inline]</code></td></tr>
|
31
31
|
<tr class="memlist"><td><a class="el" href="classPassenger_1_1DirectoryMapper.html#ef969f27622fb215990a870076648aa1">getPublicDirectory</a>()</td><td><a class="el" href="classPassenger_1_1DirectoryMapper.html">Passenger::DirectoryMapper</a></td><td><code> [inline]</code></td></tr>
|
32
32
|
</table></div>
|
33
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
33
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
34
34
|
<a href="http://www.doxygen.org/index.html">
|
35
35
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
36
36
|
</body>
|
@@ -37,9 +37,9 @@
|
|
37
37
|
<a href="classPassenger_1_1DirectoryMapper-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
|
38
38
|
<tr><td></td></tr>
|
39
39
|
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
40
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1DirectoryMapper.html#
|
40
|
+
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1DirectoryMapper.html#eccfaf22dab9e78299309ea366b7447b">DirectoryMapper</a> (request_rec *r, DirConfig *config, CachedFileStat *cstat, unsigned int throttleRate)</td></tr>
|
41
41
|
|
42
|
-
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new <a class="el" href="classPassenger_1_1DirectoryMapper.html" title="Utility class for determining URI-to-application directory mappings.">DirectoryMapper</a> object. <a href="#
|
42
|
+
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new <a class="el" href="classPassenger_1_1DirectoryMapper.html" title="Utility class for determining URI-to-application directory mappings.">DirectoryMapper</a> object. <a href="#eccfaf22dab9e78299309ea366b7447b"></a><br></td></tr>
|
43
43
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classPassenger_1_1DirectoryMapper.html#2da887c077fc2460dea204783470e821">getBaseURI</a> ()</td></tr>
|
44
44
|
|
45
45
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Determine whether the given HTTP request falls under one of the specified RailsBaseURIs or RackBaseURIs. <a href="#2da887c077fc2460dea204783470e821"></a><br></td></tr>
|
@@ -62,7 +62,7 @@ Utility class for determining URI-to-application directory mappings.
|
|
62
62
|
Given a URI, it will determine whether that URI belongs to a Phusion Passenger-handled application, what the base URI of that application is, and what the associated 'public' directory is.<p>
|
63
63
|
<dl class="note" compact><dt><b>Note:</b></dt><dd>This class is not thread-safe, but is reentrant. </dd></dl>
|
64
64
|
<hr><h2>Constructor & Destructor Documentation</h2>
|
65
|
-
<a class="anchor" name="
|
65
|
+
<a class="anchor" name="eccfaf22dab9e78299309ea366b7447b"></a><!-- doxytag: member="Passenger::DirectoryMapper::DirectoryMapper" ref="eccfaf22dab9e78299309ea366b7447b" args="(request_rec *r, DirConfig *config, CachedFileStat *cstat, unsigned int throttleRate)" -->
|
66
66
|
<div class="memitem">
|
67
67
|
<div class="memproto">
|
68
68
|
<table class="memname">
|
@@ -81,8 +81,8 @@ Given a URI, it will determine whether that URI belongs to a Phusion Passenger-h
|
|
81
81
|
<tr>
|
82
82
|
<td class="paramkey"></td>
|
83
83
|
<td></td>
|
84
|
-
<td class="paramtype">
|
85
|
-
<td class="paramname"> <em>
|
84
|
+
<td class="paramtype">CachedFileStat * </td>
|
85
|
+
<td class="paramname"> <em>cstat</em>, </td>
|
86
86
|
</tr>
|
87
87
|
<tr>
|
88
88
|
<td class="paramkey"></td>
|
@@ -104,11 +104,11 @@ Create a new <a class="el" href="classPassenger_1_1DirectoryMapper.html" title="
|
|
104
104
|
<p>
|
105
105
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
106
106
|
<table border="0" cellspacing="2" cellpadding="0">
|
107
|
-
<tr><td valign="top"></td><td valign="top"><em>
|
108
|
-
<tr><td valign="top"></td><td valign="top"><em>throttleRate</em> </td><td>A throttling rate for
|
107
|
+
<tr><td valign="top"></td><td valign="top"><em>cstat</em> </td><td>A CachedFileStat object used for statting files. </td></tr>
|
108
|
+
<tr><td valign="top"></td><td valign="top"><em>throttleRate</em> </td><td>A throttling rate for cstat. </td></tr>
|
109
109
|
</table>
|
110
110
|
</dl>
|
111
|
-
<dl class="warning" compact><dt><b>Warning:</b></dt><dd>Do not use this object after the destruction of <code>r</code>, <code>config</code> or <code>
|
111
|
+
<dl class="warning" compact><dt><b>Warning:</b></dt><dd>Do not use this object after the destruction of <code>r</code>, <code>config</code> or <code>cstat</code>. </dd></dl>
|
112
112
|
|
113
113
|
</div>
|
114
114
|
</div><p>
|
@@ -251,7 +251,7 @@ Returns an empty string if the document root of the HTTP request cannot be deter
|
|
251
251
|
<hr>The documentation for this class was generated from the following file:<ul>
|
252
252
|
<li><a class="el" href="DirectoryMapper_8h-source.html">DirectoryMapper.h</a></ul>
|
253
253
|
</div>
|
254
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
254
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
255
255
|
<a href="http://www.doxygen.org/index.html">
|
256
256
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
257
257
|
</body>
|
data/doc/cxxapi/classes.html
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
</td><td><a class="el" href="classPassenger_1_1DirectoryMapper.html">DirectoryMapper</a> (Passenger) </td><td><a name="letter_H"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> H </div></td></tr></table>
|
29
29
|
</td><td><a class="el" href="classHooks.html">Hooks</a> </td></tr></table><p><div class="qindex"><a class="qindex" href="#letter_D">D</a> | <a class="qindex" href="#letter_H">H</a></div><p>
|
30
30
|
</div>
|
31
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
31
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
32
32
|
<a href="http://www.doxygen.org/index.html">
|
33
33
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
34
34
|
</body>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<a name="l00004"></a>00004 <span class="comment">@defgroup Support Apache-independent support classes and function</span>
|
26
26
|
<a name="l00005"></a>00005 <span class="comment">*/</span>
|
27
27
|
</pre></div></div>
|
28
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
28
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
29
29
|
<a href="http://www.doxygen.org/index.html">
|
30
30
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
31
31
|
</body>
|
data/doc/cxxapi/files.html
CHANGED
@@ -29,7 +29,7 @@
|
|
29
29
|
<tr><td class="indexkey"><b>Hooks.h</b> <a href="Hooks_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
|
30
30
|
</table>
|
31
31
|
</div>
|
32
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
32
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
33
33
|
<a href="http://www.doxygen.org/index.html">
|
34
34
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
35
35
|
</body>
|
data/doc/cxxapi/functions.html
CHANGED
@@ -32,7 +32,7 @@ Here is a list of all documented class members with links to the class documenta
|
|
32
32
|
<p>
|
33
33
|
<ul>
|
34
34
|
<li>DirectoryMapper()
|
35
|
-
: <a class="el" href="classPassenger_1_1DirectoryMapper.html#
|
35
|
+
: <a class="el" href="classPassenger_1_1DirectoryMapper.html#eccfaf22dab9e78299309ea366b7447b">Passenger::DirectoryMapper</a>
|
36
36
|
<li>getApplicationType()
|
37
37
|
: <a class="el" href="classPassenger_1_1DirectoryMapper.html#ba438d86ca263972a47540956bf11ec1">Passenger::DirectoryMapper</a>
|
38
38
|
<li>getApplicationTypeString()
|
@@ -53,7 +53,7 @@ Here is a list of all documented class members with links to the class documenta
|
|
53
53
|
: <a class="el" href="classHooks.html#e3091c57c95b2f8269f566099802f0ec">Hooks</a>
|
54
54
|
</ul>
|
55
55
|
</div>
|
56
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
56
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
57
57
|
<a href="http://www.doxygen.org/index.html">
|
58
58
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
59
59
|
</body>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<p>
|
33
33
|
<ul>
|
34
34
|
<li>DirectoryMapper()
|
35
|
-
: <a class="el" href="classPassenger_1_1DirectoryMapper.html#
|
35
|
+
: <a class="el" href="classPassenger_1_1DirectoryMapper.html#eccfaf22dab9e78299309ea366b7447b">Passenger::DirectoryMapper</a>
|
36
36
|
<li>getApplicationType()
|
37
37
|
: <a class="el" href="classPassenger_1_1DirectoryMapper.html#ba438d86ca263972a47540956bf11ec1">Passenger::DirectoryMapper</a>
|
38
38
|
<li>getApplicationTypeString()
|
@@ -53,7 +53,7 @@
|
|
53
53
|
: <a class="el" href="classHooks.html#e3091c57c95b2f8269f566099802f0ec">Hooks</a>
|
54
54
|
</ul>
|
55
55
|
</div>
|
56
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
56
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
57
57
|
<a href="http://www.doxygen.org/index.html">
|
58
58
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
59
59
|
</body>
|
@@ -79,7 +79,7 @@ A purple dashed arrow is used if a class is contained or used by another class.
|
|
79
79
|
A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance. </li>
|
80
80
|
</ul>
|
81
81
|
</div>
|
82
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
82
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
83
83
|
<a href="http://www.doxygen.org/index.html">
|
84
84
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
85
85
|
</body>
|
@@ -204,7 +204,7 @@ Apache module commands array.
|
|
204
204
|
</div>
|
205
205
|
</div><p>
|
206
206
|
</div>
|
207
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
207
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
208
208
|
<a href="http://www.doxygen.org/index.html">
|
209
209
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
210
210
|
</body>
|
data/doc/cxxapi/group__Core.html
CHANGED
@@ -41,7 +41,7 @@ Collaboration diagram for Core Apache-related classes and functions:</div>
|
|
41
41
|
|
42
42
|
</table>
|
43
43
|
</div>
|
44
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
44
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
45
45
|
<a href="http://www.doxygen.org/index.html">
|
46
46
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
47
47
|
</body>
|
@@ -32,7 +32,7 @@ Collaboration diagram for Apache hooks:</div>
|
|
32
32
|
<tr><td></td></tr>
|
33
33
|
</table>
|
34
34
|
</div>
|
35
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
35
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
36
36
|
<a href="http://www.doxygen.org/index.html">
|
37
37
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
38
38
|
</body>
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<tr><td></td></tr>
|
21
21
|
</table>
|
22
22
|
</div>
|
23
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
23
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
24
24
|
<a href="http://www.doxygen.org/index.html">
|
25
25
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
26
26
|
</body>
|
data/doc/cxxapi/main.html
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
<h1>Passenger Documentation</h1>
|
20
20
|
<p>
|
21
21
|
</div>
|
22
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
22
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
23
23
|
<a href="http://www.doxygen.org/index.html">
|
24
24
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
25
25
|
</body>
|
data/doc/cxxapi/modules.html
CHANGED
@@ -25,7 +25,7 @@
|
|
25
25
|
<li><a class="el" href="group__Support.html">Apache-independent support classes and function</a>
|
26
26
|
</ul>
|
27
27
|
</div>
|
28
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
28
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 17 13:19:36 2009 for Passenger by
|
29
29
|
<a href="http://www.doxygen.org/index.html">
|
30
30
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
31
31
|
</body>
|
@@ -0,0 +1,194 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Class: ConditionVariable</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Class</span><br />ConditionVariable</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../files/lib/phusion_passenger/utils_rb.html">lib/phusion_passenger/utils.rb</a>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td>Parent:</td>
|
65
|
+
<td>
|
66
|
+
Object
|
67
|
+
</td>
|
68
|
+
</tr>
|
69
|
+
</table>
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
</table>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
<div id="content">
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div class="sectiontitle">Methods</div>
|
82
|
+
<ul>
|
83
|
+
<li><a href="#M000003">timed_wait</a></li>
|
84
|
+
<li><a href="#M000004">timed_wait!</a></li>
|
85
|
+
</ul>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
<div class="sectiontitle">Public Instance methods</div>
|
93
|
+
<div class="method">
|
94
|
+
<div class="title">
|
95
|
+
<a name="M000003"></a><b>timed_wait</b>(mutex, secs)
|
96
|
+
</div>
|
97
|
+
<div class="description">
|
98
|
+
<p>
|
99
|
+
This is like ConditionVariable.wait(), but allows one to wait a maximum
|
100
|
+
amount of time. Returns true if this condition was signaled, false if a
|
101
|
+
timeout occurred.
|
102
|
+
</p>
|
103
|
+
</div>
|
104
|
+
<div class="sourcecode">
|
105
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show source</a> ]</p>
|
106
|
+
<div id="M000003_source" class="dyn-source">
|
107
|
+
<pre>
|
108
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/utils.rb, line 446</span>
|
109
|
+
446: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">timed_wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
|
110
|
+
447: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">100000000</span>
|
111
|
+
448: <span class="ruby-comment cmt"># NOTE: If one calls timeout() on FreeBSD 5 with an</span>
|
112
|
+
449: <span class="ruby-comment cmt"># argument of more than 100000000, then MRI will become</span>
|
113
|
+
450: <span class="ruby-comment cmt"># stuck in an infite loop, blocking all threads. It seems</span>
|
114
|
+
451: <span class="ruby-comment cmt"># that MRI uses select() to implement sleeping.</span>
|
115
|
+
452: <span class="ruby-comment cmt"># I think that a value of more than 100000000 overflows</span>
|
116
|
+
453: <span class="ruby-comment cmt"># select()'s data structures, causing it to behave incorrectly.</span>
|
117
|
+
454: <span class="ruby-comment cmt"># So we just make sure we can't sleep more than 100000000</span>
|
118
|
+
455: <span class="ruby-comment cmt"># seconds.</span>
|
119
|
+
456: <span class="ruby-identifier">secs</span> = <span class="ruby-value">100000000</span>
|
120
|
+
457: <span class="ruby-keyword kw">end</span>
|
121
|
+
458: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"jruby"</span>
|
122
|
+
459: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
123
|
+
460: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
|
124
|
+
461: <span class="ruby-keyword kw">else</span>
|
125
|
+
462: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
126
|
+
463: <span class="ruby-keyword kw">end</span>
|
127
|
+
464: <span class="ruby-keyword kw">else</span>
|
128
|
+
465: <span class="ruby-identifier">require</span> <span class="ruby-value str">'timeout'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">Timeout</span>)
|
129
|
+
466: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
130
|
+
467: <span class="ruby-constant">Timeout</span>.<span class="ruby-identifier">timeout</span>(<span class="ruby-identifier">secs</span>) <span class="ruby-keyword kw">do</span>
|
131
|
+
468: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
132
|
+
469: <span class="ruby-keyword kw">end</span>
|
133
|
+
470: <span class="ruby-keyword kw">else</span>
|
134
|
+
471: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
135
|
+
472: <span class="ruby-keyword kw">end</span>
|
136
|
+
473: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
137
|
+
474: <span class="ruby-keyword kw">end</span>
|
138
|
+
475: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>
|
139
|
+
476: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
140
|
+
477: <span class="ruby-keyword kw">end</span>
|
141
|
+
</pre>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
<div class="method">
|
146
|
+
<div class="title">
|
147
|
+
<a name="M000004"></a><b>timed_wait!</b>(mutex, secs)
|
148
|
+
</div>
|
149
|
+
<div class="description">
|
150
|
+
<p>
|
151
|
+
This is like ConditionVariable.wait(), but allows one to wait a maximum
|
152
|
+
amount of time. Raises Timeout::Error if the timeout has elapsed.
|
153
|
+
</p>
|
154
|
+
</div>
|
155
|
+
<div class="sourcecode">
|
156
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show source</a> ]</p>
|
157
|
+
<div id="M000004_source" class="dyn-source">
|
158
|
+
<pre>
|
159
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/utils.rb, line 481</span>
|
160
|
+
481: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">timed_wait!</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
|
161
|
+
482: <span class="ruby-identifier">require</span> <span class="ruby-value str">'timeout'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">Timeout</span>)
|
162
|
+
483: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">100000000</span>
|
163
|
+
484: <span class="ruby-comment cmt"># See the corresponding note for timed_wait().</span>
|
164
|
+
485: <span class="ruby-identifier">secs</span> = <span class="ruby-value">100000000</span>
|
165
|
+
486: <span class="ruby-keyword kw">end</span>
|
166
|
+
487: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"jruby"</span>
|
167
|
+
488: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
168
|
+
489: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>, <span class="ruby-identifier">secs</span>)
|
169
|
+
490: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span>, <span class="ruby-value str">"Timeout"</span>
|
170
|
+
491: <span class="ruby-keyword kw">end</span>
|
171
|
+
492: <span class="ruby-keyword kw">else</span>
|
172
|
+
493: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
173
|
+
494: <span class="ruby-keyword kw">end</span>
|
174
|
+
495: <span class="ruby-keyword kw">else</span>
|
175
|
+
496: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">secs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
176
|
+
497: <span class="ruby-constant">Timeout</span>.<span class="ruby-identifier">timeout</span>(<span class="ruby-identifier">secs</span>) <span class="ruby-keyword kw">do</span>
|
177
|
+
498: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
178
|
+
499: <span class="ruby-keyword kw">end</span>
|
179
|
+
500: <span class="ruby-keyword kw">else</span>
|
180
|
+
501: <span class="ruby-identifier">wait</span>(<span class="ruby-identifier">mutex</span>)
|
181
|
+
502: <span class="ruby-keyword kw">end</span>
|
182
|
+
503: <span class="ruby-keyword kw">end</span>
|
183
|
+
504: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
184
|
+
505: <span class="ruby-keyword kw">end</span>
|
185
|
+
</pre>
|
186
|
+
</div>
|
187
|
+
</div>
|
188
|
+
</div>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
</div>
|
192
|
+
|
193
|
+
</body>
|
194
|
+
</html>
|