passenger 2.2.5 → 2.2.6

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.

Files changed (100) hide show
  1. data/NEWS +31 -1
  2. data/bin/passenger-install-apache2-module +7 -1
  3. data/bin/passenger-install-nginx-module +1 -1
  4. data/bin/passenger-memory-stats +3 -3
  5. data/doc/Users guide Apache.html +112 -13
  6. data/doc/Users guide Apache.txt +70 -9
  7. data/doc/Users guide Nginx.html +1 -1
  8. data/doc/cxxapi/Bucket_8h-source.html +1 -1
  9. data/doc/cxxapi/Configuration_8h-source.html +1 -1
  10. data/doc/cxxapi/DirectoryMapper_8h-source.html +7 -7
  11. data/doc/cxxapi/Hooks_8h-source.html +1 -1
  12. data/doc/cxxapi/annotated.html +1 -1
  13. data/doc/cxxapi/classHooks-members.html +1 -1
  14. data/doc/cxxapi/classHooks.html +1 -1
  15. data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +1 -1
  16. data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +1 -1
  17. data/doc/cxxapi/classes.html +1 -1
  18. data/doc/cxxapi/definitions_8h-source.html +1 -1
  19. data/doc/cxxapi/files.html +1 -1
  20. data/doc/cxxapi/functions.html +1 -1
  21. data/doc/cxxapi/functions_func.html +1 -1
  22. data/doc/cxxapi/graph_legend.html +1 -1
  23. data/doc/cxxapi/group__Configuration.html +1 -1
  24. data/doc/cxxapi/group__Core.html +1 -1
  25. data/doc/cxxapi/group__Hooks.html +1 -1
  26. data/doc/cxxapi/group__Support.html +1 -1
  27. data/doc/cxxapi/main.html +1 -1
  28. data/doc/cxxapi/modules.html +1 -1
  29. data/doc/rdoc/classes/ConditionVariable.html +59 -59
  30. data/doc/rdoc/classes/Exception.html +11 -11
  31. data/doc/rdoc/classes/GC.html +4 -4
  32. data/doc/rdoc/classes/IO.html +14 -14
  33. data/doc/rdoc/classes/PhusionPassenger.html +13 -13
  34. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +8 -8
  35. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +26 -26
  36. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +98 -98
  37. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +61 -61
  38. data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +8 -8
  39. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +32 -32
  40. data/doc/rdoc/classes/PhusionPassenger/Application.html +14 -14
  41. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +12 -12
  42. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +4 -4
  43. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +12 -12
  44. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +5 -5
  45. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +42 -42
  46. data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +24 -24
  47. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +8 -8
  48. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +8 -8
  49. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +62 -66
  50. data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +23 -23
  51. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +30 -30
  52. data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +8 -8
  53. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +23 -23
  54. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +4 -4
  55. data/doc/rdoc/classes/PhusionPassenger/Utils.html +384 -384
  56. data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +36 -36
  57. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +4 -4
  58. data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +7 -7
  59. data/doc/rdoc/classes/PlatformInfo.html +234 -200
  60. data/doc/rdoc/classes/RakeExtensions.html +4 -4
  61. data/doc/rdoc/classes/Signal.html +27 -27
  62. data/doc/rdoc/created.rid +1 -1
  63. data/doc/rdoc/files/DEVELOPERS_TXT.html +1 -1
  64. data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +1 -1
  65. data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +1 -1
  66. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +1 -1
  67. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +1 -1
  68. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +1 -1
  69. data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +1 -1
  70. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +1 -1
  71. data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +1 -1
  72. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +1 -1
  73. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +1 -1
  74. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +1 -1
  75. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +1 -1
  76. data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +1 -3
  77. data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +1 -1
  78. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +1 -1
  79. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +10 -9
  80. data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +1 -1
  81. data/doc/rdoc/fr_method_index.html +148 -147
  82. data/ext/apache2/DirectoryMapper.h +6 -6
  83. data/ext/common/Utils.cpp +31 -5
  84. data/ext/common/Version.h +1 -1
  85. data/ext/nginx/Configuration.c +4 -8
  86. data/ext/nginx/Configuration.h +2 -2
  87. data/ext/nginx/ContentHandler.c +11 -7
  88. data/ext/oxt/thread.hpp +12 -11
  89. data/lib/phusion_passenger/constants.rb +1 -1
  90. data/lib/phusion_passenger/dependencies.rb +40 -25
  91. data/lib/phusion_passenger/platform_info.rb +28 -11
  92. data/lib/phusion_passenger/railz/application_spawner.rb +3 -7
  93. data/lib/phusion_passenger/templates/apache2/deployment_example.txt.erb +7 -4
  94. data/lib/phusion_passenger/utils.rb +1 -0
  95. data/test/integration_tests/apache2_tests.rb +16 -0
  96. data/test/integration_tests/nginx_tests.rb +46 -0
  97. data/test/stub/MessageServer.dSYM/Contents/Info.plist +25 -0
  98. data/test/stub/MessageServer.dSYM/Contents/Resources/DWARF/MessageServer +0 -0
  99. data/test/stub/wsgi/passenger_wsgi.pyc +0 -0
  100. metadata +4 -2
@@ -78,12 +78,12 @@ Utility functions for accessing system functionality.
78
78
 
79
79
  <div class="sectiontitle">Methods</div>
80
80
  <ul>
81
- <li><a href="#M000061">accept</a></li>
82
- <li><a href="#M000062">close_all_file_descriptors</a></li>
83
- <li><a href="#M000060">create_unix_socket</a></li>
84
- <li><a href="#M000063">disable_stdio_buffering</a></li>
85
- <li><a href="#M000059">recv_fd</a></li>
86
- <li><a href="#M000058">send_fd</a></li>
81
+ <li><a href="#M000047">accept</a></li>
82
+ <li><a href="#M000048">close_all_file_descriptors</a></li>
83
+ <li><a href="#M000046">create_unix_socket</a></li>
84
+ <li><a href="#M000049">disable_stdio_buffering</a></li>
85
+ <li><a href="#M000045">recv_fd</a></li>
86
+ <li><a href="#M000044">send_fd</a></li>
87
87
  </ul>
88
88
 
89
89
 
@@ -109,7 +109,7 @@ The maximum length of a Unix socket path, including terminating null.
109
109
  <div class="sectiontitle">Public Class methods</div>
110
110
  <div class="method">
111
111
  <div class="title">
112
- <a name="M000061"></a><b> accept(fileno)<br />
112
+ <a name="M000047"></a><b> accept(fileno)<br />
113
113
  </b>
114
114
  </div>
115
115
  <div class="description">
@@ -129,8 +129,8 @@ Accept a new client from the given socket.
129
129
  </ul>
130
130
  </div>
131
131
  <div class="sourcecode">
132
- <p class="source-link">[ <a href="javascript:toggleSource('M000061_source')" id="l_M000061_source">show source</a> ]</p>
133
- <div id="M000061_source" class="dyn-source">
132
+ <p class="source-link">[ <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show source</a> ]</p>
133
+ <div id="M000047_source" class="dyn-source">
134
134
  <pre>
135
135
  /*
136
136
  * call-seq: accept(fileno)
@@ -150,7 +150,7 @@ f_accept(VALUE self, VALUE fileno) {
150
150
  </div>
151
151
  <div class="method">
152
152
  <div class="title">
153
- <a name="M000062"></a><b> close_all_file_descriptors(exceptions)<br />
153
+ <a name="M000048"></a><b> close_all_file_descriptors(exceptions)<br />
154
154
  </b>
155
155
  </div>
156
156
  <div class="description">
@@ -164,8 +164,8 @@ standard input (0) and standard output (1).
164
164
  </pre>
165
165
  </div>
166
166
  <div class="sourcecode">
167
- <p class="source-link">[ <a href="javascript:toggleSource('M000062_source')" id="l_M000062_source">show source</a> ]</p>
168
- <div id="M000062_source" class="dyn-source">
167
+ <p class="source-link">[ <a href="javascript:toggleSource('M000048_source')" id="l_M000048_source">show source</a> ]</p>
168
+ <div id="M000048_source" class="dyn-source">
169
169
  <pre>
170
170
  /*
171
171
  * call-seq: close_all_file_descriptors(exceptions)
@@ -185,7 +185,7 @@ close_all_file_descriptors(VALUE self, VALUE exceptions) {
185
185
  </div>
186
186
  <div class="method">
187
187
  <div class="title">
188
- <a name="M000060"></a><b> create_unix_socket(filename, backlog)<br />
188
+ <a name="M000046"></a><b> create_unix_socket(filename, backlog)<br />
189
189
  </b>
190
190
  </div>
191
191
  <div class="description">
@@ -210,8 +210,8 @@ namespace by prepending the filename with a null byte.
210
210
  </ul>
211
211
  </div>
212
212
  <div class="sourcecode">
213
- <p class="source-link">[ <a href="javascript:toggleSource('M000060_source')" id="l_M000060_source">show source</a> ]</p>
214
- <div id="M000060_source" class="dyn-source">
213
+ <p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p>
214
+ <div id="M000046_source" class="dyn-source">
215
215
  <pre>
216
216
  /*
217
217
  * call-seq: create_unix_socket(filename, backlog)
@@ -234,7 +234,7 @@ create_unix_socket(VALUE self, VALUE filename, VALUE backlog) {
234
234
  </div>
235
235
  <div class="method">
236
236
  <div class="title">
237
- <a name="M000063"></a><b> disable_stdio_buffering<br />
237
+ <a name="M000049"></a><b> disable_stdio_buffering<br />
238
238
  </b>
239
239
  </div>
240
240
  <div class="description">
@@ -245,8 +245,8 @@ immediate effect.
245
245
  </p>
246
246
  </div>
247
247
  <div class="sourcecode">
248
- <p class="source-link">[ <a href="javascript:toggleSource('M000063_source')" id="l_M000063_source">show source</a> ]</p>
249
- <div id="M000063_source" class="dyn-source">
248
+ <p class="source-link">[ <a href="javascript:toggleSource('M000049_source')" id="l_M000049_source">show source</a> ]</p>
249
+ <div id="M000049_source" class="dyn-source">
250
250
  <pre>
251
251
  /*
252
252
  * call-seq: disable_stdio_buffering
@@ -263,7 +263,7 @@ disable_stdio_buffering() {
263
263
  </div>
264
264
  <div class="method">
265
265
  <div class="title">
266
- <a name="M000059"></a><b> recv_fd(socket_fd)<br />
266
+ <a name="M000045"></a><b> recv_fd(socket_fd)<br />
267
267
  </b>
268
268
  </div>
269
269
  <div class="description">
@@ -278,8 +278,8 @@ provided by <a href="../IO.html#M000006">IO#recv_io</a>.
278
278
  </p>
279
279
  </div>
280
280
  <div class="sourcecode">
281
- <p class="source-link">[ <a href="javascript:toggleSource('M000059_source')" id="l_M000059_source">show source</a> ]</p>
282
- <div id="M000059_source" class="dyn-source">
281
+ <p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p>
282
+ <div id="M000045_source" class="dyn-source">
283
283
  <pre>
284
284
  /*
285
285
  * call-seq: recv_fd(socket_fd)
@@ -300,7 +300,7 @@ recv_fd(VALUE self, VALUE socket_fd) {
300
300
  </div>
301
301
  <div class="method">
302
302
  <div class="title">
303
- <a name="M000058"></a><b> send_fd(socket_fd, fd_to_send)<br />
303
+ <a name="M000044"></a><b> send_fd(socket_fd, fd_to_send)<br />
304
304
  </b>
305
305
  </div>
306
306
  <div class="description">
@@ -322,8 +322,8 @@ href="../IO.html#M000005">IO#send_io</a>.
322
322
  </ul>
323
323
  </div>
324
324
  <div class="sourcecode">
325
- <p class="source-link">[ <a href="javascript:toggleSource('M000058_source')" id="l_M000058_source">show source</a> ]</p>
326
- <div id="M000058_source" class="dyn-source">
325
+ <p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p>
326
+ <div id="M000044_source" class="dyn-source">
327
327
  <pre>
328
328
  /*
329
329
  * call-seq: send_fd(socket_fd, fd_to_send)
@@ -84,8 +84,8 @@ Class for spawning <a href="../Rack.html">Rack</a> applications.
84
84
 
85
85
  <div class="sectiontitle">Methods</div>
86
86
  <ul>
87
- <li><a href="#M000054">spawn_application</a></li>
88
- <li><a href="#M000055">spawn_application</a></li>
87
+ <li><a href="#M000040">spawn_application</a></li>
88
+ <li><a href="#M000041">spawn_application</a></li>
89
89
  </ul>
90
90
 
91
91
  <div class="sectiontitle">Included Modules</div>
@@ -100,11 +100,11 @@ Class for spawning <a href="../Rack.html">Rack</a> applications.
100
100
  <div class="sectiontitle">Public Class methods</div>
101
101
  <div class="method">
102
102
  <div class="title">
103
- <a name="M000054"></a><b>spawn_application</b>(*args)
103
+ <a name="M000040"></a><b>spawn_application</b>(*args)
104
104
  </div>
105
105
  <div class="sourcecode">
106
- <p class="source-link">[ <a href="javascript:toggleSource('M000054_source')" id="l_M000054_source">show source</a> ]</p>
107
- <div id="M000054_source" class="dyn-source">
106
+ <p class="source-link">[ <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show source</a> ]</p>
107
+ <div id="M000040_source" class="dyn-source">
108
108
  <pre>
109
109
  <span class="ruby-comment cmt"># File lib/phusion_passenger/rack/application_spawner.rb, line 43</span>
110
110
  43: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">spawn_application</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
@@ -118,7 +118,7 @@ Class for spawning <a href="../Rack.html">Rack</a> applications.
118
118
  <div class="sectiontitle">Public Instance methods</div>
119
119
  <div class="method">
120
120
  <div class="title">
121
- <a name="M000055"></a><b>spawn_application</b>(app_root, options = {})
121
+ <a name="M000041"></a><b>spawn_application</b>(app_root, options = {})
122
122
  </div>
123
123
  <div class="description">
124
124
  <p>
@@ -144,8 +144,8 @@ exit() during startup.
144
144
  </ul>
145
145
  </div>
146
146
  <div class="sourcecode">
147
- <p class="source-link">[ <a href="javascript:toggleSource('M000055_source')" id="l_M000055_source">show source</a> ]</p>
148
- <div id="M000055_source" class="dyn-source">
147
+ <p class="source-link">[ <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show source</a> ]</p>
148
+ <div id="M000041_source" class="dyn-source">
149
149
  <pre>
150
150
  <span class="ruby-comment cmt"># File lib/phusion_passenger/rack/application_spawner.rb, line 58</span>
151
151
  58: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn_application</span>(<span class="ruby-identifier">app_root</span>, <span class="ruby-identifier">options</span> = {})
@@ -84,8 +84,8 @@ A request handler for <a href="../Rack.html">Rack</a> applications.
84
84
 
85
85
  <div class="sectiontitle">Methods</div>
86
86
  <ul>
87
- <li><a href="#M000056">new</a></li>
88
- <li><a href="#M000057">process_request</a></li>
87
+ <li><a href="#M000042">new</a></li>
88
+ <li><a href="#M000043">process_request</a></li>
89
89
  </ul>
90
90
 
91
91
 
@@ -96,7 +96,7 @@ A request handler for <a href="../Rack.html">Rack</a> applications.
96
96
  <div class="sectiontitle">Public Class methods</div>
97
97
  <div class="method">
98
98
  <div class="title">
99
- <a name="M000056"></a><b>new</b>(owner_pipe, app, options = {})
99
+ <a name="M000042"></a><b>new</b>(owner_pipe, app, options = {})
100
100
  </div>
101
101
  <div class="description">
102
102
  <p>
@@ -104,8 +104,8 @@ A request handler for <a href="../Rack.html">Rack</a> applications.
104
104
  </p>
105
105
  </div>
106
106
  <div class="sourcecode">
107
- <p class="source-link">[ <a href="javascript:toggleSource('M000056_source')" id="l_M000056_source">show source</a> ]</p>
108
- <div id="M000056_source" class="dyn-source">
107
+ <p class="source-link">[ <a href="javascript:toggleSource('M000042_source')" id="l_M000042_source">show source</a> ]</p>
108
+ <div id="M000042_source" class="dyn-source">
109
109
  <pre>
110
110
  <span class="ruby-comment cmt"># File lib/phusion_passenger/rack/request_handler.rb, line 59</span>
111
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> = {})
@@ -119,7 +119,7 @@ A request handler for <a href="../Rack.html">Rack</a> applications.
119
119
  <div class="sectiontitle">Protected Instance methods</div>
120
120
  <div class="method">
121
121
  <div class="title">
122
- <a name="M000057"></a><b>process_request</b>(env, input, output)
122
+ <a name="M000043"></a><b>process_request</b>(env, input, output)
123
123
  </div>
124
124
  <div class="description">
125
125
  <p>
@@ -127,8 +127,8 @@ Overrided method.
127
127
  </p>
128
128
  </div>
129
129
  <div class="sourcecode">
130
- <p class="source-link">[ <a href="javascript:toggleSource('M000057_source')" id="l_M000057_source">show source</a> ]</p>
131
- <div id="M000057_source" class="dyn-source">
130
+ <p class="source-link">[ <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show source</a> ]</p>
131
+ <div id="M000043_source" class="dyn-source">
132
132
  <pre>
133
133
  <span class="ruby-comment cmt"># File lib/phusion_passenger/rack/request_handler.rb, line 66</span>
134
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>)
@@ -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#M000134">AbstractServer#start</a>. Starting it
93
+ href="../AbstractServer.html#M000120">AbstractServer#start</a>. Starting it
94
94
  synchronously with <a
95
- href="../AbstractServer.html#M000135">AbstractServer#start_synchronously</a>
95
+ href="../AbstractServer.html#M000121">AbstractServer#start_synchronously</a>
96
96
  has not been tested.
97
97
  </p>
98
98
  </div>
@@ -101,10 +101,10 @@ has not been tested.
101
101
 
102
102
  <div class="sectiontitle">Methods</div>
103
103
  <ul>
104
- <li><a href="#M000048">new</a></li>
105
- <li><a href="#M000049">spawn_application</a></li>
106
- <li><a href="#M000050">spawn_application!</a></li>
107
- <li><a href="#M000051">start</a></li>
104
+ <li><a href="#M000069">new</a></li>
105
+ <li><a href="#M000070">spawn_application</a></li>
106
+ <li><a href="#M000071">spawn_application!</a></li>
107
+ <li><a href="#M000072">start</a></li>
108
108
  </ul>
109
109
 
110
110
  <div class="sectiontitle">Included Modules</div>
@@ -162,7 +162,7 @@ The application root of this spawner.
162
162
  <div class="sectiontitle">Public Class methods</div>
163
163
  <div class="method">
164
164
  <div class="title">
165
- <a name="M000048"></a><b>new</b>(app_root, options = {})
165
+ <a name="M000069"></a><b>new</b>(app_root, options = {})
166
166
  </div>
167
167
  <div class="description">
168
168
  <p>
@@ -220,8 +220,8 @@ href="RequestHandler.html">RequestHandler</a>.
220
220
  </p>
221
221
  </div>
222
222
  <div class="sourcecode">
223
- <p class="source-link">[ <a href="javascript:toggleSource('M000048_source')" id="l_M000048_source">show source</a> ]</p>
224
- <div id="M000048_source" class="dyn-source">
223
+ <p class="source-link">[ <a href="javascript:toggleSource('M000069_source')" id="l_M000069_source">show source</a> ]</p>
224
+ <div id="M000069_source" class="dyn-source">
225
225
  <pre>
226
226
  <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line 102</span>
227
227
  102: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">app_root</span>, <span class="ruby-identifier">options</span> = {})
@@ -246,7 +246,7 @@ href="RequestHandler.html">RequestHandler</a>.
246
246
  <div class="sectiontitle">Public Instance methods</div>
247
247
  <div class="method">
248
248
  <div class="title">
249
- <a name="M000049"></a><b>spawn_application</b>()
249
+ <a name="M000070"></a><b>spawn_application</b>()
250
250
  </div>
251
251
  <div class="description">
252
252
  <p>
@@ -272,8 +272,8 @@ unexpectedly.
272
272
  </ul>
273
273
  </div>
274
274
  <div class="sourcecode">
275
- <p class="source-link">[ <a href="javascript:toggleSource('M000049_source')" id="l_M000049_source">show source</a> ]</p>
276
- <div id="M000049_source" class="dyn-source">
275
+ <p class="source-link">[ <a href="javascript:toggleSource('M000070_source')" id="l_M000070_source">show source</a> ]</p>
276
+ <div id="M000070_source" class="dyn-source">
277
277
  <pre>
278
278
  <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line 124</span>
279
279
  124: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn_application</span>
@@ -294,7 +294,7 @@ unexpectedly.
294
294
  </div>
295
295
  <div class="method">
296
296
  <div class="title">
297
- <a name="M000050"></a><b>spawn_application!</b>()
297
+ <a name="M000071"></a><b>spawn_application!</b>()
298
298
  </div>
299
299
  <div class="description">
300
300
  <p>
@@ -303,7 +303,7 @@ href="../Application.html">Application</a> object will be returned, which
303
303
  represents the spawned RoR application.
304
304
  </p>
305
305
  <p>
306
- Unlike <a href="ApplicationSpawner.html#M000049">spawn_application</a>,
306
+ Unlike <a href="ApplicationSpawner.html#M000070">spawn_application</a>,
307
307
  this method may be called even when the <a
308
308
  href="ApplicationSpawner.html">ApplicationSpawner</a> server isn&#8216;t
309
309
  started. This allows one to spawn a RoR application without preloading any
@@ -327,8 +327,8 @@ application raised an exception or called exit() during startup.
327
327
  </ul>
328
328
  </div>
329
329
  <div class="sourcecode">
330
- <p class="source-link">[ <a href="javascript:toggleSource('M000050_source')" id="l_M000050_source">show source</a> ]</p>
331
- <div id="M000050_source" class="dyn-source">
330
+ <p class="source-link">[ <a href="javascript:toggleSource('M000071_source')" id="l_M000071_source">show source</a> ]</p>
331
+ <div id="M000071_source" class="dyn-source">
332
332
  <pre>
333
333
  <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line 151</span>
334
334
  151: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn_application!</span>
@@ -352,51 +352,47 @@ application raised an exception or called exit() during startup.
352
352
  169: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@lower_privilege</span>
353
353
  170: <span class="ruby-identifier">lower_privilege</span>(<span class="ruby-value str">'config/environment.rb'</span>, <span class="ruby-ivar">@lowest_user</span>)
354
354
  171: <span class="ruby-keyword kw">end</span>
355
- 172:
356
- 173: <span class="ruby-comment cmt"># require Rails' environment, using the same path as the original rails dispatcher,</span>
357
- 174: <span class="ruby-comment cmt"># which normally does: require File.dirname(__FILE__) + &quot;/../config/environment&quot;</span>
358
- 175: <span class="ruby-comment cmt"># thus avoiding the possibility of including the same file twice.</span>
359
- 176: <span class="ruby-identifier">require</span> <span class="ruby-value str">'public/../config/environment'</span>
360
- 177:
361
- 178: <span class="ruby-identifier">require</span> <span class="ruby-value str">'dispatcher'</span>
362
- 179: <span class="ruby-keyword kw">end</span>
363
- 180: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">success</span>
364
- 181: <span class="ruby-identifier">start_request_handler</span>(<span class="ruby-identifier">channel</span>, <span class="ruby-keyword kw">false</span>)
365
- 182: <span class="ruby-keyword kw">end</span>
366
- 183: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SignalException</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
367
- 184: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">AbstractRequestHandler</span><span class="ruby-operator">::</span><span class="ruby-constant">HARD_TERMINATION_SIGNAL</span> <span class="ruby-operator">&amp;&amp;</span>
368
- 185: <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">AbstractRequestHandler</span><span class="ruby-operator">::</span><span class="ruby-constant">SOFT_TERMINATION_SIGNAL</span>
369
- 186: <span class="ruby-identifier">raise</span>
370
- 187: <span class="ruby-keyword kw">end</span>
371
- 188: <span class="ruby-keyword kw">end</span>
372
- 189: <span class="ruby-keyword kw">end</span>
373
- 190: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">close</span>
374
- 191: <span class="ruby-constant">Process</span>.<span class="ruby-identifier">waitpid</span>(<span class="ruby-identifier">pid</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
375
- 192:
376
- 193: <span class="ruby-identifier">channel</span> = <span class="ruby-constant">MessageChannel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">a</span>)
377
- 194: <span class="ruby-identifier">unmarshal_and_raise_errors</span>(<span class="ruby-identifier">channel</span>, <span class="ruby-ivar">@print_exceptions</span>)
378
- 195:
379
- 196: <span class="ruby-comment cmt"># No exception was raised, so spawning succeeded.</span>
380
- 197: <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">socket_name</span>, <span class="ruby-identifier">socket_type</span> = <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">read</span>
381
- 198: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pid</span>.<span class="ruby-identifier">nil?</span>
382
- 199: <span class="ruby-identifier">raise</span> <span class="ruby-constant">IOError</span>, <span class="ruby-value str">&quot;Connection closed&quot;</span>
383
- 200: <span class="ruby-keyword kw">end</span>
384
- 201: <span class="ruby-identifier">owner_pipe</span> = <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">recv_io</span>
385
- 202: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Application</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@app_root</span>, <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">socket_name</span>,
386
- 203: <span class="ruby-identifier">socket_type</span>, <span class="ruby-identifier">owner_pipe</span>)
387
- 204: <span class="ruby-keyword kw">end</span>
355
+ 172:
356
+ 173: <span class="ruby-identifier">require</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-value str">'config/environment'</span>)
357
+ 174: <span class="ruby-identifier">require</span> <span class="ruby-value str">'dispatcher'</span>
358
+ 175: <span class="ruby-keyword kw">end</span>
359
+ 176: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">success</span>
360
+ 177: <span class="ruby-identifier">start_request_handler</span>(<span class="ruby-identifier">channel</span>, <span class="ruby-keyword kw">false</span>)
361
+ 178: <span class="ruby-keyword kw">end</span>
362
+ 179: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SignalException</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
363
+ 180: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">AbstractRequestHandler</span><span class="ruby-operator">::</span><span class="ruby-constant">HARD_TERMINATION_SIGNAL</span> <span class="ruby-operator">&amp;&amp;</span>
364
+ 181: <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">AbstractRequestHandler</span><span class="ruby-operator">::</span><span class="ruby-constant">SOFT_TERMINATION_SIGNAL</span>
365
+ 182: <span class="ruby-identifier">raise</span>
366
+ 183: <span class="ruby-keyword kw">end</span>
367
+ 184: <span class="ruby-keyword kw">end</span>
368
+ 185: <span class="ruby-keyword kw">end</span>
369
+ 186: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">close</span>
370
+ 187: <span class="ruby-constant">Process</span>.<span class="ruby-identifier">waitpid</span>(<span class="ruby-identifier">pid</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
371
+ 188:
372
+ 189: <span class="ruby-identifier">channel</span> = <span class="ruby-constant">MessageChannel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">a</span>)
373
+ 190: <span class="ruby-identifier">unmarshal_and_raise_errors</span>(<span class="ruby-identifier">channel</span>, <span class="ruby-ivar">@print_exceptions</span>)
374
+ 191:
375
+ 192: <span class="ruby-comment cmt"># No exception was raised, so spawning succeeded.</span>
376
+ 193: <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">socket_name</span>, <span class="ruby-identifier">socket_type</span> = <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">read</span>
377
+ 194: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pid</span>.<span class="ruby-identifier">nil?</span>
378
+ 195: <span class="ruby-identifier">raise</span> <span class="ruby-constant">IOError</span>, <span class="ruby-value str">&quot;Connection closed&quot;</span>
379
+ 196: <span class="ruby-keyword kw">end</span>
380
+ 197: <span class="ruby-identifier">owner_pipe</span> = <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">recv_io</span>
381
+ 198: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Application</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@app_root</span>, <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">socket_name</span>,
382
+ 199: <span class="ruby-identifier">socket_type</span>, <span class="ruby-identifier">owner_pipe</span>)
383
+ 200: <span class="ruby-keyword kw">end</span>
388
384
  </pre>
389
385
  </div>
390
386
  </div>
391
387
  </div>
392
388
  <div class="method">
393
389
  <div class="title">
394
- <a name="M000051"></a><b>start</b>()
390
+ <a name="M000072"></a><b>start</b>()
395
391
  </div>
396
392
  <div class="description">
397
393
  <p>
398
394
  Overrided from <a
399
- href="../AbstractServer.html#M000134">AbstractServer#start</a>.
395
+ href="../AbstractServer.html#M000120">AbstractServer#start</a>.
400
396
  </p>
401
397
  <p>
402
398
  May raise these additional exceptions:
@@ -414,22 +410,22 @@ unexpectedly.
414
410
  </ul>
415
411
  </div>
416
412
  <div class="sourcecode">
417
- <p class="source-link">[ <a href="javascript:toggleSource('M000051_source')" id="l_M000051_source">show source</a> ]</p>
418
- <div id="M000051_source" class="dyn-source">
413
+ <p class="source-link">[ <a href="javascript:toggleSource('M000072_source')" id="l_M000072_source">show source</a> ]</p>
414
+ <div id="M000072_source" class="dyn-source">
419
415
  <pre>
420
- <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line 212</span>
421
- 212: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>
422
- 213: <span class="ruby-keyword kw">super</span>
423
- 214: <span class="ruby-keyword kw">begin</span>
424
- 215: <span class="ruby-identifier">unmarshal_and_raise_errors</span>(<span class="ruby-identifier">server</span>, <span class="ruby-ivar">@print_exceptions</span>)
425
- 216: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">IOError</span>, <span class="ruby-constant">SystemCallError</span>, <span class="ruby-constant">SocketError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
426
- 217: <span class="ruby-identifier">stop</span>
427
- 218: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Error</span>, <span class="ruby-node">&quot;The application spawner server exited unexpectedly: #{e}&quot;</span>
428
- 219: <span class="ruby-keyword kw">rescue</span>
429
- 220: <span class="ruby-identifier">stop</span>
430
- 221: <span class="ruby-identifier">raise</span>
431
- 222: <span class="ruby-keyword kw">end</span>
432
- 223: <span class="ruby-keyword kw">end</span>
416
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line 208</span>
417
+ 208: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>
418
+ 209: <span class="ruby-keyword kw">super</span>
419
+ 210: <span class="ruby-keyword kw">begin</span>
420
+ 211: <span class="ruby-identifier">unmarshal_and_raise_errors</span>(<span class="ruby-identifier">server</span>, <span class="ruby-ivar">@print_exceptions</span>)
421
+ 212: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">IOError</span>, <span class="ruby-constant">SystemCallError</span>, <span class="ruby-constant">SocketError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
422
+ 213: <span class="ruby-identifier">stop</span>
423
+ 214: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Error</span>, <span class="ruby-node">&quot;The application spawner server exited unexpectedly: #{e}&quot;</span>
424
+ 215: <span class="ruby-keyword kw">rescue</span>
425
+ 216: <span class="ruby-identifier">stop</span>
426
+ 217: <span class="ruby-identifier">raise</span>
427
+ 218: <span class="ruby-keyword kw">end</span>
428
+ 219: <span class="ruby-keyword kw">end</span>
433
429
  </pre>
434
430
  </div>
435
431
  </div>
@@ -77,10 +77,10 @@
77
77
 
78
78
  <div class="description"><p>
79
79
  Modifies CGI so that we can use it. Main thing it does is expose the <a
80
- href="CGIFixed.html#M000046">stdinput</a> and <a
81
- href="CGIFixed.html#M000047">stdoutput</a> so <a
80
+ href="CGIFixed.html#M000067">stdinput</a> and <a
81
+ href="CGIFixed.html#M000068">stdoutput</a> so <a
82
82
  href="RequestHandler.html">RequestHandler</a> can connect them to the right
83
- sources. It also exposes the <a href="CGIFixed.html#M000045">env_table</a>
83
+ sources. It also exposes the <a href="CGIFixed.html#M000066">env_table</a>
84
84
  so that <a href="RequestHandler.html">RequestHandler</a> can hook the
85
85
  request parameters into the environment table.
86
86
  </p>
@@ -94,11 +94,11 @@ backwards compatibility is removed.
94
94
 
95
95
  <div class="sectiontitle">Methods</div>
96
96
  <ul>
97
- <li><a href="#M000044">args</a></li>
98
- <li><a href="#M000045">env_table</a></li>
99
- <li><a href="#M000043">new</a></li>
100
- <li><a href="#M000046">stdinput</a></li>
101
- <li><a href="#M000047">stdoutput</a></li>
97
+ <li><a href="#M000065">args</a></li>
98
+ <li><a href="#M000066">env_table</a></li>
99
+ <li><a href="#M000064">new</a></li>
100
+ <li><a href="#M000067">stdinput</a></li>
101
+ <li><a href="#M000068">stdoutput</a></li>
102
102
  </ul>
103
103
 
104
104
 
@@ -109,11 +109,11 @@ backwards compatibility is removed.
109
109
  <div class="sectiontitle">Public Class methods</div>
110
110
  <div class="method">
111
111
  <div class="title">
112
- <a name="M000043"></a><b>new</b>(params, input, output, *args)
112
+ <a name="M000064"></a><b>new</b>(params, input, output, *args)
113
113
  </div>
114
114
  <div class="sourcecode">
115
- <p class="source-link">[ <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show source</a> ]</p>
116
- <div id="M000043_source" class="dyn-source">
115
+ <p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p>
116
+ <div id="M000064_source" class="dyn-source">
117
117
  <pre>
118
118
  <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/cgi_fixed.rb, line 42</span>
119
119
  42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">params</span>, <span class="ruby-identifier">input</span>, <span class="ruby-identifier">output</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
@@ -130,11 +130,11 @@ backwards compatibility is removed.
130
130
  <div class="sectiontitle">Public Instance methods</div>
131
131
  <div class="method">
132
132
  <div class="title">
133
- <a name="M000044"></a><b>args</b>()
133
+ <a name="M000065"></a><b>args</b>()
134
134
  </div>
135
135
  <div class="sourcecode">
136
- <p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p>
137
- <div id="M000044_source" class="dyn-source">
136
+ <p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p>
137
+ <div id="M000065_source" class="dyn-source">
138
138
  <pre>
139
139
  <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/cgi_fixed.rb, line 50</span>
140
140
  50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">args</span>
@@ -146,11 +146,11 @@ backwards compatibility is removed.
146
146
  </div>
147
147
  <div class="method">
148
148
  <div class="title">
149
- <a name="M000045"></a><b>env_table</b>()
149
+ <a name="M000066"></a><b>env_table</b>()
150
150
  </div>
151
151
  <div class="sourcecode">
152
- <p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p>
153
- <div id="M000045_source" class="dyn-source">
152
+ <p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p>
153
+ <div id="M000066_source" class="dyn-source">
154
154
  <pre>
155
155
  <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/cgi_fixed.rb, line 54</span>
156
156
  54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">env_table</span>
@@ -162,11 +162,11 @@ backwards compatibility is removed.
162
162
  </div>
163
163
  <div class="method">
164
164
  <div class="title">
165
- <a name="M000046"></a><b>stdinput</b>()
165
+ <a name="M000067"></a><b>stdinput</b>()
166
166
  </div>
167
167
  <div class="sourcecode">
168
- <p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p>
169
- <div id="M000046_source" class="dyn-source">
168
+ <p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p>
169
+ <div id="M000067_source" class="dyn-source">
170
170
  <pre>
171
171
  <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/cgi_fixed.rb, line 58</span>
172
172
  58: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stdinput</span>
@@ -178,11 +178,11 @@ backwards compatibility is removed.
178
178
  </div>
179
179
  <div class="method">
180
180
  <div class="title">
181
- <a name="M000047"></a><b>stdoutput</b>()
181
+ <a name="M000068"></a><b>stdoutput</b>()
182
182
  </div>
183
183
  <div class="sourcecode">
184
- <p class="source-link">[ <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show source</a> ]</p>
185
- <div id="M000047_source" class="dyn-source">
184
+ <p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p>
185
+ <div id="M000068_source" class="dyn-source">
186
186
  <pre>
187
187
  <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/cgi_fixed.rb, line 62</span>
188
188
  62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stdoutput</span>