passenger 2.2.1 → 2.2.2

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 (216) hide show
  1. data/Rakefile +66 -79
  2. data/bin/passenger-install-nginx-module +1 -1
  3. data/bin/passenger-memory-stats +1 -1
  4. data/bin/passenger-spawn-server +8 -2
  5. data/doc/Users guide Apache.html +33 -49
  6. data/doc/Users guide Apache.txt +28 -27
  7. data/doc/Users guide Nginx.html +9 -19
  8. data/doc/Users guide Nginx.txt +8 -20
  9. data/doc/cxxapi/Bucket_8h-source.html +1 -1
  10. data/doc/cxxapi/Configuration_8h-source.html +297 -300
  11. data/doc/cxxapi/DirectoryMapper_8h-source.html +1 -1
  12. data/doc/cxxapi/Hooks_8h-source.html +1 -1
  13. data/doc/cxxapi/annotated.html +1 -1
  14. data/doc/cxxapi/classHooks-members.html +1 -1
  15. data/doc/cxxapi/classHooks.html +1 -1
  16. data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +1 -1
  17. data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +1 -1
  18. data/doc/cxxapi/classes.html +1 -1
  19. data/doc/cxxapi/definitions_8h-source.html +1 -1
  20. data/doc/cxxapi/files.html +1 -1
  21. data/doc/cxxapi/functions.html +1 -1
  22. data/doc/cxxapi/functions_func.html +1 -1
  23. data/doc/cxxapi/graph_legend.html +1 -1
  24. data/doc/cxxapi/group__Configuration.html +1 -23
  25. data/doc/cxxapi/group__Core.html +1 -1
  26. data/doc/cxxapi/group__Hooks.html +1 -1
  27. data/doc/cxxapi/group__Support.html +1 -1
  28. data/doc/cxxapi/main.html +1 -1
  29. data/doc/cxxapi/modules.html +1 -1
  30. data/doc/users_guide_snippets/rackup_specifications.txt +4 -2
  31. data/ext/apache2/Configuration.h +0 -3
  32. data/ext/apache2/Hooks.cpp +5 -3
  33. data/ext/common/ApplicationPoolServer.h +1 -0
  34. data/ext/common/ApplicationPoolServerExecutable.cpp +5 -2
  35. data/ext/common/SpawnManager.h +1 -0
  36. data/ext/common/Utils.cpp +22 -23
  37. data/ext/common/Utils.h +32 -21
  38. data/ext/common/Version.h +31 -0
  39. data/ext/nginx/ContentHandler.c +61 -8
  40. data/ext/nginx/HelperServer.cpp +3 -0
  41. data/ext/nginx/HttpStatusExtractor.h +185 -0
  42. data/ext/nginx/StaticContentHandler.c +18 -3
  43. data/ext/nginx/config +2 -1
  44. data/ext/nginx/ngx_http_passenger_module.c +21 -15
  45. data/ext/oxt/backtrace.cpp +4 -2
  46. data/ext/oxt/spin_lock.hpp +3 -3
  47. data/lib/phusion_passenger/abstract_request_handler.rb +5 -3
  48. data/lib/phusion_passenger/admin_tools/control_process.rb +6 -1
  49. data/lib/phusion_passenger/constants.rb +2 -2
  50. data/lib/phusion_passenger/rack/application_spawner.rb +2 -1
  51. data/lib/phusion_passenger/rack/request_handler.rb +45 -35
  52. data/lib/phusion_passenger/templates/nginx/config_snippets.txt.erb +1 -1
  53. data/lib/phusion_passenger/utils.rb +13 -3
  54. data/misc/rake/cplusplus.rb +7 -0
  55. data/test/ApplicationPoolServer_ApplicationPoolTest.cpp +2 -0
  56. data/test/ApplicationPoolTest.cpp +39 -62
  57. data/test/CxxTestMain.cpp +6 -6
  58. data/test/HttpStatusExtractorTest.cpp +17 -0
  59. data/test/StandardApplicationPoolTest.cpp +2 -0
  60. data/test/UtilsTest.cpp +17 -28
  61. data/test/ruby/abstract_request_handler_spec.rb +3 -7
  62. data/test/ruby/utils_spec.rb +18 -13
  63. data/test/ruby/wsgi/application_spawner_spec.rb +5 -9
  64. data/test/stub/railsapp/app/controllers/{bar_controller_1.rb → bar_controller.rb} +0 -0
  65. data/test/stub/railsapp/app/controllers/bar_controller_1.txt +5 -0
  66. data/test/stub/railsapp/app/controllers/{bar_controller_2.rb → bar_controller_2.txt} +0 -0
  67. data/test/support/Support.h +20 -0
  68. data/test/support/config.rb +13 -0
  69. data/vendor/README +4 -3
  70. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/COPYING +1 -1
  71. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/KNOWN-ISSUES +0 -0
  72. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/README +54 -7
  73. data/vendor/rack-1.0.0-git/Rakefile +164 -0
  74. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack.rb +7 -3
  75. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/adapter/camping.rb +0 -0
  76. data/vendor/rack-1.0.0-git/lib/rack/auth/abstract/handler.rb +37 -0
  77. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/auth/abstract/request.rb +0 -0
  78. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/auth/basic.rb +0 -0
  79. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/auth/digest/md5.rb +1 -1
  80. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/auth/digest/nonce.rb +0 -0
  81. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/auth/digest/params.rb +0 -0
  82. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/auth/digest/request.rb +2 -2
  83. data/vendor/rack-1.0.0-git/lib/rack/auth/openid.rb +480 -0
  84. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/builder.rb +1 -5
  85. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/cascade.rb +0 -0
  86. data/vendor/rack-1.0.0-git/lib/rack/chunked.rb +49 -0
  87. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/commonlogger.rb +0 -0
  88. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/conditionalget.rb +4 -0
  89. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/content_length.rb +7 -3
  90. data/vendor/rack-1.0.0-git/lib/rack/content_type.rb +23 -0
  91. data/vendor/rack-1.0.0-git/lib/rack/deflater.rb +96 -0
  92. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/directory.rb +5 -2
  93. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/file.rb +4 -1
  94. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/handler.rb +22 -1
  95. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/handler/cgi.rb +7 -3
  96. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/handler/evented_mongrel.rb +0 -0
  97. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/handler/fastcgi.rb +26 -24
  98. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/handler/lsws.rb +7 -4
  99. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/handler/mongrel.rb +5 -3
  100. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/handler/scgi.rb +5 -3
  101. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/handler/swiftiplied_mongrel.rb +0 -0
  102. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/handler/thin.rb +3 -0
  103. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/handler/webrick.rb +11 -5
  104. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/head.rb +0 -0
  105. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/lint.rb +138 -66
  106. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/lobster.rb +0 -0
  107. data/vendor/rack-1.0.0-git/lib/rack/lock.rb +16 -0
  108. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/methodoverride.rb +0 -0
  109. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/mime.rb +4 -4
  110. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/mock.rb +42 -5
  111. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/recursive.rb +0 -0
  112. data/vendor/rack-1.0.0-git/lib/rack/reloader.rb +106 -0
  113. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/request.rb +46 -10
  114. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/response.rb +15 -3
  115. data/vendor/rack-1.0.0-git/lib/rack/rewindable_input.rb +98 -0
  116. data/vendor/rack-1.0.0-git/lib/rack/session/abstract/id.rb +142 -0
  117. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/session/cookie.rb +2 -0
  118. data/vendor/rack-1.0.0-git/lib/rack/session/memcache.rb +109 -0
  119. data/vendor/rack-1.0.0-git/lib/rack/session/pool.rb +100 -0
  120. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/showexceptions.rb +2 -1
  121. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/showstatus.rb +1 -1
  122. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/static.rb +0 -0
  123. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/urlmap.rb +12 -5
  124. data/vendor/{rack-0.9.1 → rack-1.0.0-git}/lib/rack/utils.rb +212 -65
  125. metadata +71 -170
  126. data/doc/rdoc/classes/ConditionVariable.html +0 -194
  127. data/doc/rdoc/classes/Exception.html +0 -120
  128. data/doc/rdoc/classes/GC.html +0 -113
  129. data/doc/rdoc/classes/IO.html +0 -169
  130. data/doc/rdoc/classes/PhusionPassenger.html +0 -238
  131. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +0 -153
  132. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +0 -506
  133. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +0 -692
  134. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +0 -97
  135. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +0 -96
  136. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +0 -97
  137. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +0 -96
  138. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +0 -598
  139. data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +0 -140
  140. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +0 -264
  141. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess/Instance.html +0 -138
  142. data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +0 -154
  143. data/doc/rdoc/classes/PhusionPassenger/Application.html +0 -283
  144. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +0 -172
  145. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +0 -145
  146. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +0 -175
  147. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +0 -141
  148. data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +0 -92
  149. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +0 -489
  150. data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +0 -350
  151. data/doc/rdoc/classes/PhusionPassenger/Rack.html +0 -91
  152. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +0 -185
  153. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +0 -184
  154. data/doc/rdoc/classes/PhusionPassenger/Railz.html +0 -95
  155. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +0 -419
  156. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner/Error.html +0 -98
  157. data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +0 -200
  158. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +0 -443
  159. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner/Error.html +0 -98
  160. data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +0 -154
  161. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +0 -402
  162. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +0 -125
  163. data/doc/rdoc/classes/PhusionPassenger/Utils.html +0 -694
  164. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +0 -140
  165. data/doc/rdoc/classes/PhusionPassenger/WSGI.html +0 -89
  166. data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +0 -188
  167. data/doc/rdoc/classes/PlatformInfo.html +0 -831
  168. data/doc/rdoc/classes/RakeExtensions.html +0 -197
  169. data/doc/rdoc/classes/Signal.html +0 -134
  170. data/doc/rdoc/created.rid +0 -1
  171. data/doc/rdoc/files/DEVELOPERS_TXT.html +0 -240
  172. data/doc/rdoc/files/README.html +0 -157
  173. data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +0 -92
  174. data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +0 -129
  175. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +0 -131
  176. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +0 -126
  177. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +0 -130
  178. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +0 -129
  179. data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +0 -122
  180. data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +0 -127
  181. data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +0 -126
  182. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +0 -122
  183. data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +0 -134
  184. data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +0 -122
  185. data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +0 -122
  186. data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +0 -126
  187. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +0 -122
  188. data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +0 -122
  189. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +0 -127
  190. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +0 -133
  191. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +0 -126
  192. data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +0 -143
  193. data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +0 -126
  194. data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +0 -145
  195. data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +0 -127
  196. data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +0 -122
  197. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +0 -161
  198. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +0 -175
  199. data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +0 -129
  200. data/doc/rdoc/files/misc/rake/extensions_rb.html +0 -130
  201. data/doc/rdoc/fr_class_index.html +0 -90
  202. data/doc/rdoc/fr_file_index.html +0 -76
  203. data/doc/rdoc/fr_method_index.html +0 -195
  204. data/doc/rdoc/index.html +0 -26
  205. data/doc/rdoc/rdoc-style.css +0 -187
  206. data/vendor/rack-0.9.1/AUTHORS +0 -8
  207. data/vendor/rack-0.9.1/ChangeLog +0 -1423
  208. data/vendor/rack-0.9.1/Rakefile +0 -188
  209. data/vendor/rack-0.9.1/SPEC +0 -129
  210. data/vendor/rack-0.9.1/lib/rack/auth/abstract/handler.rb +0 -28
  211. data/vendor/rack-0.9.1/lib/rack/auth/openid.rb +0 -438
  212. data/vendor/rack-0.9.1/lib/rack/deflater.rb +0 -87
  213. data/vendor/rack-0.9.1/lib/rack/reloader.rb +0 -64
  214. data/vendor/rack-0.9.1/lib/rack/session/abstract/id.rb +0 -153
  215. data/vendor/rack-0.9.1/lib/rack/session/memcache.rb +0 -97
  216. data/vendor/rack-0.9.1/lib/rack/session/pool.rb +0 -73
@@ -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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
319
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:37 2009 for Passenger by&nbsp;
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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
68
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:37 2009 for Passenger by&nbsp;
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>
@@ -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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
30
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
31
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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>
@@ -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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
151
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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>
@@ -30,7 +30,7 @@
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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
33
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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>
@@ -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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
254
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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>
@@ -28,7 +28,7 @@
28
28
  </td><td><a class="el" href="classPassenger_1_1DirectoryMapper.html">DirectoryMapper</a> (Passenger)&nbsp;&nbsp;&nbsp;</td><td><a name="letter_H"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&nbsp;&nbsp;H&nbsp;&nbsp;</div></td></tr></table>
29
29
  </td><td><a class="el" href="classHooks.html">Hooks</a>&nbsp;&nbsp;&nbsp;</td></tr></table><p><div class="qindex"><a class="qindex" href="#letter_D">D</a>&nbsp;|&nbsp;<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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
31
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
28
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:37 2009 for Passenger by&nbsp;
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>
@@ -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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
32
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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>
@@ -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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
56
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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>
@@ -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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
56
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
82
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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>
@@ -30,10 +30,6 @@ Collaboration diagram for Apache module configuration:</div>
30
30
  </div>
31
31
  <table border="0" cellpadding="0" cellspacing="0">
32
32
  <tr><td></td></tr>
33
- <tr><td colspan="2"><br><h2>Defines</h2></td></tr>
34
- <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Configuration.html#ga19398896775408d6ab7fd8ce2acd992">PASSENGER_VERSION</a>&nbsp;&nbsp;&nbsp;&quot;2.2.1&quot;</td></tr>
35
-
36
- <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Module version number. <a href="#ga19398896775408d6ab7fd8ce2acd992"></a><br></td></tr>
37
33
  <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
38
34
  <tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Configuration.html#g92dc583c1fa5f8025149799e356a6c78">passenger_config_create_dir</a> (apr_pool_t *p, char *dirspec)</td></tr>
39
35
 
@@ -52,24 +48,6 @@ Collaboration diagram for Apache module configuration:</div>
52
48
 
53
49
  <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Apache module commands array. <a href="#g21954abbf4018583acb9d8daef3dfd95"></a><br></td></tr>
54
50
  </table>
55
- <hr><h2>Define Documentation</h2>
56
- <a class="anchor" name="ga19398896775408d6ab7fd8ce2acd992"></a><!-- doxytag: member="Configuration.h::PASSENGER_VERSION" ref="ga19398896775408d6ab7fd8ce2acd992" args="" -->
57
- <div class="memitem">
58
- <div class="memproto">
59
- <table class="memname">
60
- <tr>
61
- <td class="memname">#define PASSENGER_VERSION&nbsp;&nbsp;&nbsp;&quot;2.2.1&quot; </td>
62
- </tr>
63
- </table>
64
- </div>
65
- <div class="memdoc">
66
-
67
- <p>
68
- Module version number.
69
- <p>
70
-
71
- </div>
72
- </div><p>
73
51
  <hr><h2>Function Documentation</h2>
74
52
  <a class="anchor" name="g92dc583c1fa5f8025149799e356a6c78"></a><!-- doxytag: member="Configuration.h::passenger_config_create_dir" ref="g92dc583c1fa5f8025149799e356a6c78" args="(apr_pool_t *p, char *dirspec)" -->
75
53
  <div class="memitem">
@@ -226,7 +204,7 @@ Apache module commands array.
226
204
  </div>
227
205
  </div><p>
228
206
  </div>
229
- <hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
207
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
230
208
  <a href="http://www.doxygen.org/index.html">
231
209
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
232
210
  </body>
@@ -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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
44
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
35
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
23
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
22
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:37 2009 for Passenger by&nbsp;
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>
@@ -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 Sat Apr 18 20:08:25 2009 for Passenger by&nbsp;
28
+ <hr size="1"><address style="text-align: right;"><small>Generated on Sun Apr 26 13:02:38 2009 for Passenger by&nbsp;
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>
@@ -53,9 +53,11 @@ run Merb::Rack::Application.new
53
53
 
54
54
  ==== Ramaze ====
55
55
  ------------------------------------------------------
56
- require "start"
56
+ require "rubygems"
57
+ require "ramaze"
57
58
  Ramaze.trait[:essentials].delete Ramaze::Adapter
58
- Ramaze.start :force => true
59
+ require "start"
60
+ Ramaze.start!
59
61
  run Ramaze::Adapter::Base
60
62
  ------------------------------------------------------
61
63
 
@@ -45,9 +45,6 @@
45
45
  * @{
46
46
  */
47
47
 
48
- /** Module version number. */
49
- #define PASSENGER_VERSION "2.2.1"
50
-
51
48
  #ifdef __cplusplus
52
49
  #include <set>
53
50
  #include <string>
@@ -39,6 +39,7 @@
39
39
  #include "ApplicationPoolServer.h"
40
40
  #include "MessageChannel.h"
41
41
  #include "DirectoryMapper.h"
42
+ #include "Version.h"
42
43
 
43
44
  /* The Apache/APR headers *must* come after the Boost headers, otherwise
44
45
  * compilation will fail on OpenBSD.
@@ -644,7 +645,9 @@ private:
644
645
  addHeader(headers, "REQUEST_METHOD", r->method);
645
646
  addHeader(headers, "REQUEST_URI", r->unparsed_uri);
646
647
  addHeader(headers, "QUERY_STRING", r->args ? r->args : "");
647
- if (strcmp(baseURI, "/") != 0) {
648
+ if (strcmp(baseURI, "/") == 0) {
649
+ addHeader(headers, "SCRIPT_NAME", "");
650
+ } else {
648
651
  addHeader(headers, "SCRIPT_NAME", baseURI);
649
652
  }
650
653
  addHeader(headers, "HTTPS", lookupEnv(r, "HTTPS"));
@@ -696,7 +699,7 @@ private:
696
699
  *
697
700
  * "SSL_CLIENT_CERT\0\0"
698
701
  *
699
- * The data in the buffer will be processed by the RequestHandler class,
702
+ * The data in the buffer will be processed by the AbstractRequestHandler class,
700
703
  * which is implemented in Ruby. But it uses Hash[*data.split("\0")] to
701
704
  * unserialize the data. Unfortunately String#split will not transform
702
705
  * the trailing "\0\0" into an empty string:
@@ -821,7 +824,6 @@ public:
821
824
  * the second time.
822
825
  */
823
826
  unsetenv("TMPDIR");
824
- unsetenv("PASSENGER_INSTANCE_TEMP_DIR");
825
827
  createPassengerTempDir(config->getTempDir(), config->userSwitching,
826
828
  config->getDefaultUser(), unixd_config.user_id,
827
829
  unixd_config.group_id);
@@ -594,6 +594,7 @@ private:
594
594
  m_logFile.c_str(),
595
595
  m_rubyCommand.c_str(),
596
596
  m_user.c_str(),
597
+ getPassengerTempDir().c_str(),
597
598
  (char *) 0);
598
599
  int e = errno;
599
600
  fprintf(stderr, "*** Passenger ERROR (%s:%d):\n"
@@ -208,8 +208,11 @@ public:
208
208
  const string &spawnServerCommand,
209
209
  const string &logFile,
210
210
  const string &rubyCommand,
211
- const string &user)
211
+ const string &user,
212
+ const string &passengerTempDir)
212
213
  {
214
+ setPassengerTempDir(passengerTempDir);
215
+
213
216
  pool = ptr(new StandardApplicationPool(spawnServerCommand,
214
217
  logFile, rubyCommand, user));
215
218
  Passenger::setLogLevel(logLevel);
@@ -595,7 +598,7 @@ main(int argc, char *argv[]) {
595
598
  try {
596
599
  exeFile = argv[0];
597
600
  Server server(SERVER_SOCKET_FD, atoi(argv[1]),
598
- argv[2], argv[3], argv[4], argv[5]);
601
+ argv[2], argv[3], argv[4], argv[5], argv[6]);
599
602
  return server.start();
600
603
  } catch (const tracable_exception &e) {
601
604
  P_ERROR("*** Fatal error: " << e.what() << "\n" << e.backtrace());
@@ -217,6 +217,7 @@ private:
217
217
  execlp(rubyCommand.c_str(),
218
218
  rubyCommand.c_str(),
219
219
  spawnServerCommand.c_str(),
220
+ getPassengerTempDir().c_str(),
220
221
  // The spawn server changes the process names of the subservers
221
222
  // that it starts, for better usability. However, the process name length
222
223
  // (as shown by ps) is limited. Here, we try to expand that limit by
data/ext/common/Utils.cpp CHANGED
@@ -33,6 +33,8 @@
33
33
 
34
34
  namespace Passenger {
35
35
 
36
+ static string passengerTempDir;
37
+
36
38
  int
37
39
  atoi(const string &s) {
38
40
  return ::atoi(s.c_str());
@@ -292,38 +294,35 @@ getSystemTempDir() {
292
294
  }
293
295
 
294
296
  string
295
- getPassengerTempDir(bool bypassCache, const string &systemTempDir) {
296
- if (bypassCache) {
297
- goto calculateResult;
297
+ getPassengerTempDir(bool bypassCache, const string &parentDir) {
298
+ if (!bypassCache && !passengerTempDir.empty()) {
299
+ return passengerTempDir;
298
300
  } else {
299
- const char *tmp = getenv("PASSENGER_INSTANCE_TEMP_DIR");
300
- if (tmp != NULL && *tmp != '\0') {
301
- return tmp;
301
+ string theParentDir;
302
+ char buffer[PATH_MAX];
303
+
304
+ if (parentDir.empty()) {
305
+ theParentDir = getSystemTempDir();
302
306
  } else {
303
- goto calculateResult;
307
+ theParentDir = parentDir;
304
308
  }
309
+ snprintf(buffer, sizeof(buffer), "%s/passenger.%lu",
310
+ theParentDir.c_str(), (unsigned long) getpid());
311
+ buffer[sizeof(buffer) - 1] = '\0';
312
+ passengerTempDir = buffer;
313
+ return passengerTempDir;
305
314
  }
315
+ }
306
316
 
307
- calculateResult:
308
- const char *temp_dir;
309
- char buffer[PATH_MAX];
310
-
311
- if (systemTempDir.empty()) {
312
- temp_dir = getSystemTempDir();
313
- } else {
314
- temp_dir = systemTempDir.c_str();
315
- }
316
- snprintf(buffer, sizeof(buffer), "%s/passenger.%lu",
317
- temp_dir, (unsigned long) getpid());
318
- buffer[sizeof(buffer) - 1] = '\0';
319
- setenv("PASSENGER_INSTANCE_TEMP_DIR", buffer, 1);
320
- return buffer;
317
+ void
318
+ setPassengerTempDir(const string &dir) {
319
+ passengerTempDir = dir;
321
320
  }
322
321
 
323
322
  void
324
- createPassengerTempDir(const string &systemTempDir, bool userSwitching,
323
+ createPassengerTempDir(const string &parentDir, bool userSwitching,
325
324
  const string &lowestUser, uid_t workerUid, gid_t workerGid) {
326
- string tmpDir(getPassengerTempDir(false, systemTempDir));
325
+ string tmpDir(getPassengerTempDir(false, parentDir));
327
326
  uid_t lowestUid;
328
327
  gid_t lowestGid;
329
328
 
data/ext/common/Utils.h CHANGED
@@ -270,27 +270,37 @@ const char *getSystemTempDir();
270
270
  * temporary files are to be stored. This directory is unique for this instance
271
271
  * of the web server in which Phusion Passenger is running.
272
272
  *
273
- * If the environment variable PASSENGER_INSTANCE_TEMP_DIR is set, then that value
274
- * will be returned. If this environment variable is not set, then it will be set
275
- * with the return value.
276
- *
277
- * To bypass the usage of the PASSENGER_INSTANCE_TEMP_DIR environment variable,
278
- * set 'bypassCache' to true.
279
- *
280
- * @param bypassCache Whether PASSENGER_INSTANCE_TEMP_DIR should be bypassed.
281
- * @param systemTempDir The directory under which the Phusion Passenger-specific
282
- * temp directory should be located. If set to the empty string,
283
- * then the return value of getSystemTempDir() will be used.
273
+ * The calculated value will be stored in an internal variable, so that subsequent
274
+ * calls will return the same value. To bypass the usage of this internal variable,
275
+ * set <tt>bypassCache</tt> to true. In this case, the value of the internal
276
+ * variable will be set to the newly calculated value.
277
+ *
278
+ * @param bypassCache Whether the value of the internal variable should be bypassed.
279
+ * @param parentDir The directory under which the Phusion Passenger-specific
280
+ * temp directory should be located. If set to the empty string,
281
+ * then the return value of getSystemTempDir() will be used.
282
+ * This argument only has effect if the value of the internal
283
+ * variable is not consulted.
284
284
  * @ensure !result.empty()
285
285
  * @ingroup Support
286
286
  */
287
- string getPassengerTempDir(bool bypassCache = false, const string &systemTempDir = "");
287
+ string getPassengerTempDir(bool bypassCache = false, const string &parentDir = "");
288
+
289
+ /**
290
+ * Force subsequent calls to <tt>getPassengerTempDir(false, ...)</tt> to return the given value.
291
+ * <tt>dir</tt> is not created automatically if it doesn't exist.
292
+ *
293
+ * <tt>dir</tt> may also be an empty string, in which case it will cause the next
294
+ * call to <tt>getPassengerTempDir()</tt> to re-calculate the temp directory's path.
295
+ */
296
+ void setPassengerTempDir(const string &dir);
288
297
 
289
- /* Create a temp directory under <em>systemTempDir</em>, for storing Phusion
290
- * Passenger-specific temp files, such as temporarily buffered uploads,
291
- * sockets for backend processes, etc. This call also sets the
292
- * PASSENGER_INSTANCE_TEMP_DIR environment variable, which allows subprocesses
293
- * to find this temp directory.
298
+ /* Create a temporary directory for storing Phusion Passenger-specific temp files,
299
+ * such as temporarily buffered uploads, sockets for backend processes, etc.
300
+ * The directory that will be created is the one returned by
301
+ * <tt>getPassengerTempDir(false, parentDir)</tt>. This call stores the path to
302
+ * this temp directory in an internal variable, so that subsequent calls to
303
+ * getPassengerTempDir() will return the same path.
294
304
  *
295
305
  * The created temp directory will have several subdirectories:
296
306
  * - webserver_private - for storing the web server's buffered uploads.
@@ -315,9 +325,10 @@ string getPassengerTempDir(bool bypassCache = false, const string &systemTempDir
315
325
  * will set directory permissions and owners/groups, which may require
316
326
  * root privileges.
317
327
  *
318
- * @param systemTempDir The directory under which the Phusion Passenger-specific
319
- * temp directory should be created. You should normally
320
- * specify the return value of getSystemTempDir().
328
+ * @param parentDir The directory under which the Phusion Passenger-specific
329
+ * temp directory should be created. This argument may be the
330
+ * empty string, in which case getSystemTempDir() will be used
331
+ * as the parent directory.
321
332
  * @param userSwitching Whether user switching is turned on.
322
333
  * @param lowestUser The user that the spawn manager and the pool server will
323
334
  * run as, if user switching is turned off.
@@ -331,7 +342,7 @@ string getPassengerTempDir(bool bypassCache = false, const string &systemTempDir
331
342
  * @throws SystemException Something went wrong.
332
343
  * @throws FileSystemException Something went wrong.
333
344
  */
334
- void createPassengerTempDir(const string &systemTempDir, bool userSwitching,
345
+ void createPassengerTempDir(const string &parentDir, bool userSwitching,
335
346
  const string &lowestUser,
336
347
  uid_t workerUid, gid_t workerGid);
337
348