passenger 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- data/NEWS +137 -0
- data/Rakefile +101 -19
- data/bin/passenger-install-nginx-module +10 -3
- data/bin/passenger-make-enterprisey +1 -1
- data/doc/Users guide Apache.html +227 -92
- data/doc/Users guide Apache.txt +169 -75
- data/doc/Users guide Nginx.html +1 -1
- data/doc/cxxapi/Bucket_8h-source.html +1 -1
- data/doc/cxxapi/Configuration_8h-source.html +373 -338
- data/doc/cxxapi/DirectoryMapper_8h-source.html +1 -1
- 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 +2 -2
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +1 -1
- 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 +1 -1
- data/doc/cxxapi/functions_func.html +1 -1
- 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 +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 +1 -1
- data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +8 -8
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +136 -136
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +254 -254
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +61 -61
- data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +4 -4
- data/doc/rdoc/classes/PhusionPassenger/Application.html +14 -14
- data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +12 -12
- data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +4 -4
- data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +12 -12
- data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +5 -5
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +139 -139
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +61 -56
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +3 -3
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +7 -7
- data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +15 -15
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +119 -119
- data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +4 -4
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +310 -312
- data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +169 -0
- data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +4 -4
- data/doc/rdoc/classes/PlatformInfo.html +165 -164
- data/doc/rdoc/classes/Signal.html +23 -23
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +26 -28
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +26 -28
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +26 -28
- data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +26 -28
- data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +1 -2
- data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +26 -28
- data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +26 -28
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +34 -36
- data/doc/rdoc/fr_class_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +72 -68
- data/ext/apache2/Configuration.cpp +69 -15
- data/ext/apache2/Configuration.h +37 -2
- data/ext/apache2/Hooks.cpp +167 -59
- data/ext/common/ApplicationPoolServerExecutable.cpp +1 -1
- data/ext/common/MessageChannel.h +4 -4
- data/ext/common/StandardApplicationPool.h +1 -1
- data/ext/common/Timer.h +2 -0
- data/ext/common/Version.h +1 -1
- data/ext/nginx/Configuration.c +3 -3
- data/ext/nginx/ContentHandler.c +16 -4
- data/ext/nginx/HelperServer.cpp +1 -1
- data/ext/oxt/system_calls.cpp +6 -1
- data/ext/oxt/thread.hpp +17 -2
- data/ext/phusion_passenger/native_support.c +4 -4
- data/lib/phusion_passenger/abstract_request_handler.rb +3 -3
- data/lib/phusion_passenger/abstract_server.rb +1 -0
- data/lib/phusion_passenger/constants.rb +1 -1
- data/lib/phusion_passenger/message_channel.rb +1 -0
- data/lib/phusion_passenger/platform_info.rb +3 -2
- data/lib/phusion_passenger/rack/request_handler.rb +11 -7
- data/lib/phusion_passenger/railz/application_spawner.rb +7 -4
- data/lib/phusion_passenger/railz/request_handler.rb +1 -0
- data/lib/phusion_passenger/spawn_manager.rb +1 -0
- data/lib/phusion_passenger/utils.rb +38 -20
- data/test/integration_tests/apache2_tests.rb +162 -100
- data/test/integration_tests/mycook_spec.rb +63 -62
- data/test/integration_tests/nginx_tests.rb +12 -5
- data/test/ruby/utils_spec.rb +98 -14
- data/test/stub/apache2/httpd.conf.erb +2 -1
- data/test/stub/rails_apps/mycook/app/controllers/welcome_controller.rb +8 -0
- data/test/support/apache2_controller.rb +5 -1
- data/test/support/test_helper.rb +42 -13
- metadata +7 -137
@@ -107,11 +107,11 @@ A request handler for <a href="../Rack.html">Rack</a> applications.
|
|
107
107
|
<p class="source-link">[ <a href="javascript:toggleSource('M000056_source')" id="l_M000056_source">show source</a> ]</p>
|
108
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 59</span>
|
111
|
+
59: <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
|
+
60: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">owner_pipe</span>, <span class="ruby-identifier">options</span>)
|
113
|
+
61: <span class="ruby-ivar">@app</span> = <span class="ruby-identifier">app</span>
|
114
|
+
62: <span class="ruby-keyword kw">end</span>
|
115
115
|
</pre>
|
116
116
|
</div>
|
117
117
|
</div>
|
@@ -130,58 +130,63 @@ Overrided method.
|
|
130
130
|
<p class="source-link">[ <a href="javascript:toggleSource('M000057_source')" id="l_M000057_source">show source</a> ]</p>
|
131
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
|
-
|
133
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/rack/request_handler.rb, line 66</span>
|
134
|
+
66: <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
|
+
67: <span class="ruby-identifier">rewindable_input</span> = <span class="ruby-operator">::</span><span class="ruby-constant">Rack</span><span class="ruby-operator">::</span><span class="ruby-constant">RewindableInput</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">input</span>)
|
136
|
+
68: <span class="ruby-keyword kw">begin</span>
|
137
|
+
69: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_VERSION</span>] = <span class="ruby-constant">RACK_VERSION_VALUE</span>
|
138
|
+
70: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_INPUT</span>] = <span class="ruby-identifier">rewindable_input</span>
|
139
|
+
71: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_ERRORS</span>] = <span class="ruby-constant">STDERR</span>
|
140
|
+
72: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_MULTITHREAD</span>] = <span class="ruby-keyword kw">false</span>
|
141
|
+
73: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_MULTIPROCESS</span>] = <span class="ruby-keyword kw">true</span>
|
142
|
+
74: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_RUN_ONCE</span>] = <span class="ruby-keyword kw">false</span>
|
143
|
+
75:
|
144
|
+
76: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>] <span class="ruby-operator">&&</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_LENGTH</span>]
|
145
|
+
77: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>)
|
146
|
+
78: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>] <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_LENGTH</span>]
|
147
|
+
79: <span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_LENGTH</span>] = <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>]
|
147
148
|
80: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>)
|
148
|
-
81: <span class="ruby-keyword kw">
|
149
|
-
82:
|
150
|
-
83: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">
|
151
|
-
84: <span class="ruby-keyword kw">
|
152
|
-
85:
|
153
|
-
86: <span class="ruby-identifier">env</span
|
154
|
-
87: <span class="ruby-keyword kw">
|
155
|
-
88:
|
156
|
-
89: <span class="ruby-keyword kw">
|
157
|
-
90:
|
158
|
-
91: <span class="ruby-
|
159
|
-
92:
|
160
|
-
93:
|
161
|
-
94:
|
162
|
-
95:
|
163
|
-
96:
|
164
|
-
97:
|
165
|
-
98:
|
166
|
-
99:
|
167
|
-
100:
|
168
|
-
101:
|
169
|
-
102:
|
170
|
-
103:
|
171
|
-
104:
|
172
|
-
105: <span class="ruby-
|
173
|
-
106: <span class="ruby-keyword kw">
|
174
|
-
107:
|
175
|
-
108:
|
176
|
-
109: <span class="ruby-
|
177
|
-
110: <span class="ruby-keyword kw">
|
178
|
-
111:
|
179
|
-
112:
|
180
|
-
113:
|
181
|
-
114:
|
182
|
-
115: <span class="ruby-
|
183
|
-
116:
|
184
|
-
117:
|
149
|
+
81: <span class="ruby-keyword kw">end</span>
|
150
|
+
82: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_TYPE</span>] <span class="ruby-operator">&&</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_TYPE</span>]
|
151
|
+
83: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">HTTP_CONTENT_TYPE</span>)
|
152
|
+
84: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_TYPE</span>] <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_TYPE</span>]
|
153
|
+
85: <span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_TYPE</span>] = <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_TYPE</span>]
|
154
|
+
86: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">HTTP_CONTENT_TYPE</span>)
|
155
|
+
87: <span class="ruby-keyword kw">end</span>
|
156
|
+
88:
|
157
|
+
89: <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>
|
158
|
+
90: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_URL_SCHEME</span>] = <span class="ruby-constant">HTTPS_DOWNCASE</span>
|
159
|
+
91: <span class="ruby-keyword kw">else</span>
|
160
|
+
92: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_URL_SCHEME</span>] = <span class="ruby-constant">HTTP</span>
|
161
|
+
93: <span class="ruby-keyword kw">end</span>
|
162
|
+
94:
|
163
|
+
95: <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>)
|
164
|
+
96: <span class="ruby-keyword kw">begin</span>
|
165
|
+
97: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">"Status: #{status.to_i}#{CRLF}"</span>)
|
166
|
+
98: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">"X-Powered-By: #{PASSENGER_HEADER}#{CRLF}"</span>)
|
167
|
+
99: <span class="ruby-identifier">headers</span>.<span class="ruby-identifier">each</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>
|
168
|
+
100: <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>)
|
169
|
+
101: <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>)
|
170
|
+
102: <span class="ruby-keyword kw">end</span>
|
171
|
+
103: <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>
|
172
|
+
104: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">"#{key}: #{value}#{CRLF}"</span>)
|
173
|
+
105: <span class="ruby-keyword kw">end</span>
|
174
|
+
106: <span class="ruby-keyword kw">end</span>
|
175
|
+
107: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">CRLF</span>)
|
176
|
+
108: <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>)
|
177
|
+
109: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">body</span>)
|
178
|
+
110: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">body</span>
|
179
|
+
111: <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>
|
180
|
+
112: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">s</span>)
|
181
|
+
113: <span class="ruby-keyword kw">end</span>
|
182
|
+
114: <span class="ruby-keyword kw">end</span>
|
183
|
+
115: <span class="ruby-keyword kw">ensure</span>
|
184
|
+
116: <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>)
|
185
|
+
117: <span class="ruby-keyword kw">end</span>
|
186
|
+
118: <span class="ruby-keyword kw">ensure</span>
|
187
|
+
119: <span class="ruby-identifier">rewindable_input</span>.<span class="ruby-identifier">close</span>
|
188
|
+
120: <span class="ruby-keyword kw">end</span>
|
189
|
+
121: <span class="ruby-keyword kw">end</span>
|
185
190
|
</pre>
|
186
191
|
</div>
|
187
192
|
</div>
|
@@ -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#M000134">AbstractServer#start</a>. Starting it
|
94
94
|
synchronously with <a
|
95
|
-
href="../AbstractServer.html#
|
95
|
+
href="../AbstractServer.html#M000135">AbstractServer#start_synchronously</a>
|
96
96
|
has not been tested.
|
97
97
|
</p>
|
98
98
|
</div>
|
@@ -396,7 +396,7 @@ application raised an exception or called exit() during startup.
|
|
396
396
|
<div class="description">
|
397
397
|
<p>
|
398
398
|
Overrided from <a
|
399
|
-
href="../AbstractServer.html#
|
399
|
+
href="../AbstractServer.html#M000134">AbstractServer#start</a>.
|
400
400
|
</p>
|
401
401
|
<p>
|
402
402
|
May raise these additional exceptions:
|
@@ -95,9 +95,9 @@ href="ApplicationSpawner.html">ApplicationSpawner</a> internally.
|
|
95
95
|
<p>
|
96
96
|
<b>Note</b>: <a href="FrameworkSpawner.html">FrameworkSpawner</a> may only
|
97
97
|
be started asynchronously with <a
|
98
|
-
href="../AbstractServer.html#
|
98
|
+
href="../AbstractServer.html#M000134">AbstractServer#start</a>. Starting it
|
99
99
|
synchronously with <a
|
100
|
-
href="../AbstractServer.html#
|
100
|
+
href="../AbstractServer.html#M000135">AbstractServer#start_synchronously</a>
|
101
101
|
has not been tested.
|
102
102
|
</p>
|
103
103
|
</div>
|
@@ -165,8 +165,8 @@ Note that the specified Rails framework will be loaded during the entire
|
|
165
165
|
life time of the <a href="FrameworkSpawner.html">FrameworkSpawner</a>
|
166
166
|
server. If you wish to <a href="FrameworkSpawner.html#M000042">reload</a>
|
167
167
|
the Rails framework‘s code, then restart the server by calling <a
|
168
|
-
href="../AbstractServer.html#
|
169
|
-
href="../AbstractServer.html#
|
168
|
+
href="../AbstractServer.html#M000136">AbstractServer#stop</a> and <a
|
169
|
+
href="../AbstractServer.html#M000134">AbstractServer#start</a>.
|
170
170
|
</p>
|
171
171
|
</div>
|
172
172
|
<div class="sourcecode">
|
@@ -279,8 +279,8 @@ you must do one of these things:
|
|
279
279
|
</p>
|
280
280
|
<ul>
|
281
281
|
<li>Restart this <a href="FrameworkSpawner.html">FrameworkSpawner</a> by
|
282
|
-
calling <a href="../AbstractServer.html#
|
283
|
-
then <a href="../AbstractServer.html#
|
282
|
+
calling <a href="../AbstractServer.html#M000136">AbstractServer#stop</a>,
|
283
|
+
then <a href="../AbstractServer.html#M000134">AbstractServer#start</a>.
|
284
284
|
|
285
285
|
</li>
|
286
286
|
<li>Reload the application by calling <a
|
@@ -372,7 +372,7 @@ unexpectedly.
|
|
372
372
|
<div class="description">
|
373
373
|
<p>
|
374
374
|
Overrided from <a
|
375
|
-
href="../AbstractServer.html#
|
375
|
+
href="../AbstractServer.html#M000134">AbstractServer#start</a>.
|
376
376
|
</p>
|
377
377
|
<p>
|
378
378
|
May raise these additional exceptions:
|
@@ -110,13 +110,13 @@ A request handler for Ruby on Rails applications.
|
|
110
110
|
<p class="source-link">[ <a href="javascript:toggleSource('M000052_source')" id="l_M000052_source">show source</a> ]</p>
|
111
111
|
<div id="M000052_source" class="dyn-source">
|
112
112
|
<pre>
|
113
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/request_handler.rb, line
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
113
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/request_handler.rb, line 38</span>
|
114
|
+
38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">owner_pipe</span>, <span class="ruby-identifier">options</span> = {})
|
115
|
+
39: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">owner_pipe</span>, <span class="ruby-identifier">options</span>)
|
116
|
+
40: <span class="ruby-constant">NINJA_PATCHING_LOCK</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span>
|
117
|
+
41: <span class="ruby-identifier">ninja_patch_action_controller</span>
|
118
|
+
42: <span class="ruby-keyword kw">end</span>
|
119
|
+
43: <span class="ruby-keyword kw">end</span>
|
120
120
|
</pre>
|
121
121
|
</div>
|
122
122
|
</div>
|
@@ -135,14 +135,14 @@ Overrided method.
|
|
135
135
|
<p class="source-link">[ <a href="javascript:toggleSource('M000053_source')" id="l_M000053_source">show source</a> ]</p>
|
136
136
|
<div id="M000053_source" class="dyn-source">
|
137
137
|
<pre>
|
138
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/request_handler.rb, line
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
138
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/railz/request_handler.rb, line 47</span>
|
139
|
+
47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_request</span>(<span class="ruby-identifier">headers</span>, <span class="ruby-identifier">input</span>, <span class="ruby-identifier">output</span>)
|
140
|
+
48: <span class="ruby-identifier">headers</span>[<span class="ruby-constant">CONTENT_LENGTH</span>] = <span class="ruby-identifier">headers</span>[<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>]
|
141
|
+
49: <span class="ruby-identifier">cgi</span> = <span class="ruby-constant">CGIFixed</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">headers</span>, <span class="ruby-identifier">input</span>, <span class="ruby-identifier">output</span>)
|
142
|
+
50: <span class="ruby-operator">::</span><span class="ruby-constant">Dispatcher</span>.<span class="ruby-identifier">dispatch</span>(<span class="ruby-identifier">cgi</span>,
|
143
|
+
51: <span class="ruby-operator">::</span><span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">CgiRequest</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_SESSION_OPTIONS</span>,
|
144
|
+
52: <span class="ruby-identifier">cgi</span>.<span class="ruby-identifier">stdoutput</span>)
|
145
|
+
53: <span class="ruby-keyword kw">end</span>
|
146
146
|
</pre>
|
147
147
|
</div>
|
148
148
|
</div>
|
@@ -85,9 +85,9 @@ fascade for the rest of the spawn manager system.
|
|
85
85
|
<p>
|
86
86
|
<b>Note</b>: <a href="SpawnManager.html">SpawnManager</a> may only be
|
87
87
|
started synchronously with <a
|
88
|
-
href="AbstractServer.html#
|
88
|
+
href="AbstractServer.html#M000135">AbstractServer#start_synchronously</a>.
|
89
89
|
Starting asynchronously has not been tested. Don‘t forget to call <a
|
90
|
-
href="SpawnManager.html#
|
90
|
+
href="SpawnManager.html#M000123">cleanup</a> after the server‘s main
|
91
91
|
loop has finished.
|
92
92
|
</p>
|
93
93
|
<h2>Ruby on Rails optimizations</h2>
|
@@ -116,10 +116,10 @@ work around an obscure bug in ActiveSupport‘s Dispatcher.
|
|
116
116
|
|
117
117
|
<div class="sectiontitle">Methods</div>
|
118
118
|
<ul>
|
119
|
-
<li><a href="#
|
120
|
-
<li><a href="#
|
121
|
-
<li><a href="#
|
122
|
-
<li><a href="#
|
119
|
+
<li><a href="#M000123">cleanup</a></li>
|
120
|
+
<li><a href="#M000120">new</a></li>
|
121
|
+
<li><a href="#M000122">reload</a></li>
|
122
|
+
<li><a href="#M000121">spawn_application</a></li>
|
123
123
|
</ul>
|
124
124
|
|
125
125
|
<div class="sectiontitle">Included Modules</div>
|
@@ -134,45 +134,45 @@ work around an obscure bug in ActiveSupport‘s Dispatcher.
|
|
134
134
|
<div class="sectiontitle">Public Class methods</div>
|
135
135
|
<div class="method">
|
136
136
|
<div class="title">
|
137
|
-
<a name="
|
137
|
+
<a name="M000120"></a><b>new</b>()
|
138
138
|
</div>
|
139
139
|
<div class="sourcecode">
|
140
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
141
|
-
<div id="
|
140
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000120_source')" id="l_M000120_source">show source</a> ]</p>
|
141
|
+
<div id="M000120_source" class="dyn-source">
|
142
142
|
<pre>
|
143
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/spawn_manager.rb, line
|
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
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
143
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/spawn_manager.rb, line 61</span>
|
144
|
+
61: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
145
|
+
62: <span class="ruby-keyword kw">super</span>()
|
146
|
+
63: <span class="ruby-ivar">@spawners</span> = <span class="ruby-constant">AbstractServerCollection</span>.<span class="ruby-identifier">new</span>
|
147
|
+
64: <span class="ruby-identifier">define_message_handler</span>(<span class="ruby-identifier">:spawn_application</span>, <span class="ruby-identifier">:handle_spawn_application</span>)
|
148
|
+
65: <span class="ruby-identifier">define_message_handler</span>(<span class="ruby-identifier">:reload</span>, <span class="ruby-identifier">:handle_reload</span>)
|
149
|
+
66: <span class="ruby-identifier">define_signal_handler</span>(<span class="ruby-value str">'SIGHUP'</span>, <span class="ruby-identifier">:reload</span>)
|
150
|
+
67:
|
151
|
+
68: <span class="ruby-comment cmt"># Start garbage collector in order to free up some existing</span>
|
152
|
+
69: <span class="ruby-comment cmt"># heap slots. This prevents the heap from growing unnecessarily</span>
|
153
|
+
70: <span class="ruby-comment cmt"># during the startup phase.</span>
|
154
|
+
71: <span class="ruby-constant">GC</span>.<span class="ruby-identifier">start</span>
|
155
|
+
72: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">GC</span>.<span class="ruby-identifier">copy_on_write_friendly?</span>
|
156
|
+
73: <span class="ruby-comment cmt"># Preload libraries for copy-on-write semantics.</span>
|
157
|
+
74: <span class="ruby-identifier">require</span> <span class="ruby-value str">'base64'</span>
|
158
|
+
75: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger/application'</span>
|
159
|
+
76: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger/railz/framework_spawner'</span>
|
160
|
+
77: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger/railz/application_spawner'</span>
|
161
|
+
78: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger/rack/application_spawner'</span>
|
162
|
+
79: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger/html_template'</span>
|
163
|
+
80: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger/platform_info'</span>
|
164
|
+
81: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger/exceptions'</span>
|
165
|
+
82:
|
166
|
+
83: <span class="ruby-comment cmt"># Commonly used libraries.</span>
|
167
|
+
84: [<span class="ruby-value str">'mysql'</span>, <span class="ruby-value str">'sqlite3'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">lib</span><span class="ruby-operator">|</span>
|
168
|
+
85: <span class="ruby-keyword kw">begin</span>
|
169
|
+
86: <span class="ruby-identifier">require</span> <span class="ruby-identifier">lib</span>
|
170
|
+
87: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span>
|
171
|
+
88: <span class="ruby-comment cmt"># Do nothing; ignore if not present.</span>
|
172
|
+
89: <span class="ruby-keyword kw">end</span>
|
173
|
+
90: <span class="ruby-keyword kw">end</span>
|
174
|
+
91: <span class="ruby-keyword kw">end</span>
|
175
|
+
92: <span class="ruby-keyword kw">end</span>
|
176
176
|
</pre>
|
177
177
|
</div>
|
178
178
|
</div>
|
@@ -180,7 +180,7 @@ work around an obscure bug in ActiveSupport‘s Dispatcher.
|
|
180
180
|
<div class="sectiontitle">Public Instance methods</div>
|
181
181
|
<div class="method">
|
182
182
|
<div class="title">
|
183
|
-
<a name="
|
183
|
+
<a name="M000123"></a><b>cleanup</b>()
|
184
184
|
</div>
|
185
185
|
<div class="description">
|
186
186
|
<p>
|
@@ -189,20 +189,20 @@ href="SpawnManager.html">SpawnManager</a> is no longer needed.
|
|
189
189
|
</p>
|
190
190
|
</div>
|
191
191
|
<div class="sourcecode">
|
192
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
193
|
-
<div id="
|
192
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000123_source')" id="l_M000123_source">show source</a> ]</p>
|
193
|
+
<div id="M000123_source" class="dyn-source">
|
194
194
|
<pre>
|
195
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/spawn_manager.rb, line
|
196
|
-
|
197
|
-
|
198
|
-
|
195
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/spawn_manager.rb, line 215</span>
|
196
|
+
215: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cleanup</span>
|
197
|
+
216: <span class="ruby-ivar">@spawners</span>.<span class="ruby-identifier">cleanup</span>
|
198
|
+
217: <span class="ruby-keyword kw">end</span>
|
199
199
|
</pre>
|
200
200
|
</div>
|
201
201
|
</div>
|
202
202
|
</div>
|
203
203
|
<div class="method">
|
204
204
|
<div class="title">
|
205
|
-
<a name="
|
205
|
+
<a name="M000122"></a><b>reload</b>(app_root = nil)
|
206
206
|
</div>
|
207
207
|
<div class="description">
|
208
208
|
<p>
|
@@ -213,8 +213,8 @@ will be removed, no matter the application root.
|
|
213
213
|
<p>
|
214
214
|
<b>Long description:</b> <a href="Application.html">Application</a> code
|
215
215
|
might be cached in memory. But once it a while, it will be necessary to <a
|
216
|
-
href="SpawnManager.html#
|
217
|
-
such as after deploying a <a href="SpawnManager.html#
|
216
|
+
href="SpawnManager.html#M000122">reload</a> the code for an application,
|
217
|
+
such as after deploying a <a href="SpawnManager.html#M000120">new</a>
|
218
218
|
version of the application. This method makes sure that any cached
|
219
219
|
application code is removed, so that the next time an application instance
|
220
220
|
is spawned, the application code will be freshly loaded into memory.
|
@@ -224,42 +224,42 @@ Raises AbstractServer::SpawnError if something went wrong.
|
|
224
224
|
</p>
|
225
225
|
</div>
|
226
226
|
<div class="sourcecode">
|
227
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
228
|
-
<div id="
|
227
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000122_source')" id="l_M000122_source">show source</a> ]</p>
|
228
|
+
<div id="M000122_source" class="dyn-source">
|
229
229
|
<pre>
|
230
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/spawn_manager.rb, line
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
230
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/spawn_manager.rb, line 188</span>
|
231
|
+
188: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reload</span>(<span class="ruby-identifier">app_root</span> = <span class="ruby-keyword kw">nil</span>)
|
232
|
+
189: <span class="ruby-ivar">@spawners</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span>
|
233
|
+
190: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_root</span>
|
234
|
+
191: <span class="ruby-comment cmt"># Delete associated ApplicationSpawner.</span>
|
235
|
+
192: <span class="ruby-ivar">@spawners</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-node">"app:#{app_root}"</span>)
|
236
|
+
193: <span class="ruby-keyword kw">else</span>
|
237
|
+
194: <span class="ruby-comment cmt"># Delete all ApplicationSpawners.</span>
|
238
|
+
195: <span class="ruby-identifier">keys_to_delete</span> = []
|
239
|
+
196: <span class="ruby-ivar">@spawners</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">spawner</span><span class="ruby-operator">|</span>
|
240
|
+
197: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">spawner</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Railz</span><span class="ruby-operator">::</span><span class="ruby-constant">ApplicationSpawner</span>)
|
241
|
+
198: <span class="ruby-identifier">keys_to_delete</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">key</span>
|
242
|
+
199: <span class="ruby-keyword kw">end</span>
|
243
|
+
200: <span class="ruby-keyword kw">end</span>
|
244
|
+
201: <span class="ruby-identifier">keys_to_delete</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
|
245
|
+
202: <span class="ruby-ivar">@spawners</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>)
|
246
|
+
203: <span class="ruby-keyword kw">end</span>
|
247
|
+
204: <span class="ruby-keyword kw">end</span>
|
248
|
+
205: <span class="ruby-ivar">@spawners</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spawner</span><span class="ruby-operator">|</span>
|
249
|
+
206: <span class="ruby-comment cmt"># Reload all FrameworkSpawners.</span>
|
250
|
+
207: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">spawner</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:reload</span>)
|
251
|
+
208: <span class="ruby-identifier">spawner</span>.<span class="ruby-identifier">reload</span>(<span class="ruby-identifier">app_root</span>)
|
252
|
+
209: <span class="ruby-keyword kw">end</span>
|
253
|
+
210: <span class="ruby-keyword kw">end</span>
|
254
|
+
211: <span class="ruby-keyword kw">end</span>
|
255
|
+
212: <span class="ruby-keyword kw">end</span>
|
256
256
|
</pre>
|
257
257
|
</div>
|
258
258
|
</div>
|
259
259
|
</div>
|
260
260
|
<div class="method">
|
261
261
|
<div class="title">
|
262
|
-
<a name="
|
262
|
+
<a name="M000121"></a><b>spawn_application</b>(options)
|
263
263
|
</div>
|
264
264
|
<div class="description">
|
265
265
|
<p>
|
@@ -288,12 +288,12 @@ must do one of these things:
|
|
288
288
|
|
289
289
|
<ul>
|
290
290
|
<li>Restart this <a href="SpawnManager.html">SpawnManager</a> by calling <a
|
291
|
-
href="AbstractServer.html#
|
292
|
-
href="AbstractServer.html#
|
291
|
+
href="AbstractServer.html#M000136">AbstractServer#stop</a>, then <a
|
292
|
+
href="AbstractServer.html#M000134">AbstractServer#start</a>.
|
293
293
|
|
294
294
|
</li>
|
295
295
|
<li>Reload the application by calling <a
|
296
|
-
href="SpawnManager.html#
|
296
|
+
href="SpawnManager.html#M000122">reload</a> with the correct app_root
|
297
297
|
argument.
|
298
298
|
|
299
299
|
</li>
|
@@ -354,42 +354,42 @@ exception or called exit() during startup.
|
|
354
354
|
</ul>
|
355
355
|
</div>
|
356
356
|
<div class="sourcecode">
|
357
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
358
|
-
<div id="
|
357
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000121_source')" id="l_M000121_source">show source</a> ]</p>
|
358
|
+
<div id="M000121_source" class="dyn-source">
|
359
359
|
<pre>
|
360
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/spawn_manager.rb, line
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
360
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/spawn_manager.rb, line 142</span>
|
361
|
+
142: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn_application</span>(<span class="ruby-identifier">options</span>)
|
362
|
+
143: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value str">"app_root"</span>]
|
363
|
+
144: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"The 'app_root' option must be given."</span>
|
364
|
+
145: <span class="ruby-keyword kw">end</span>
|
365
|
+
146: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">sanitize_spawn_options</span>(<span class="ruby-identifier">options</span>)
|
366
|
+
147:
|
367
|
+
148: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">"app_type"</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">"rails"</span>
|
368
|
+
149: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">Railz</span><span class="ruby-operator">::</span><span class="ruby-constant">FrameworkSpawner</span>)
|
369
|
+
150: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger/application'</span>
|
370
|
+
151: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger/railz/framework_spawner'</span>
|
371
|
+
152: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger/railz/application_spawner'</span>
|
372
|
+
153: <span class="ruby-keyword kw">end</span>
|
373
|
+
154: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">spawn_rails_application</span>(<span class="ruby-identifier">options</span>)
|
374
|
+
155: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">"app_type"</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">"rack"</span>
|
375
|
+
156: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">Rack</span><span class="ruby-operator">::</span><span class="ruby-constant">ApplicationSpawner</span>)
|
376
|
+
157: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger/rack/application_spawner'</span>
|
377
|
+
158: <span class="ruby-keyword kw">end</span>
|
378
|
+
159: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Rack</span><span class="ruby-operator">::</span><span class="ruby-constant">ApplicationSpawner</span>.<span class="ruby-identifier">spawn_application</span>(
|
379
|
+
160: <span class="ruby-identifier">options</span>[<span class="ruby-value str">"app_root"</span>], <span class="ruby-identifier">options</span>
|
380
|
+
161: )
|
381
|
+
162: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">"app_type"</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">"wsgi"</span>
|
382
|
+
163: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger/wsgi/application_spawner'</span>
|
383
|
+
164: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">WSGI</span><span class="ruby-operator">::</span><span class="ruby-constant">ApplicationSpawner</span>.<span class="ruby-identifier">spawn_application</span>(
|
384
|
+
165: <span class="ruby-identifier">options</span>[<span class="ruby-value str">"app_root"</span>],
|
385
|
+
166: <span class="ruby-identifier">options</span>[<span class="ruby-value str">"lower_privilege"</span>],
|
386
|
+
167: <span class="ruby-identifier">options</span>[<span class="ruby-value str">"lowest_user"</span>],
|
387
|
+
168: <span class="ruby-identifier">options</span>[<span class="ruby-value str">"environment"</span>]
|
388
|
+
169: )
|
389
|
+
170: <span class="ruby-keyword kw">else</span>
|
390
|
+
171: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Unknown 'app_type' value '#{options["app_type"]}'."</span>
|
391
|
+
172: <span class="ruby-keyword kw">end</span>
|
392
|
+
173: <span class="ruby-keyword kw">end</span>
|
393
393
|
</pre>
|
394
394
|
</div>
|
395
395
|
</div>
|