passenger 2.2.11 → 2.2.12

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 (287) hide show
  1. data/NEWS +29 -0
  2. data/bin/passenger-install-nginx-module +1 -1
  3. data/doc/Users guide Apache.html +38 -7
  4. data/doc/Users guide Nginx.html +36 -5
  5. data/doc/cxxapi/AbstractSpawnManager_8h-source.html +1 -1
  6. data/doc/cxxapi/Account_8h-source.html +1 -1
  7. data/doc/cxxapi/AccountsDatabase_8h-source.html +1 -1
  8. data/doc/cxxapi/AgentsStarter_8h-source.html +1 -1
  9. data/doc/cxxapi/BCrypt_8h-source.html +1 -1
  10. data/doc/cxxapi/Blowfish_8h-source.html +1 -1
  11. data/doc/cxxapi/Bucket_8h-source.html +5 -4
  12. data/doc/cxxapi/Constants_8h-source.html +2 -2
  13. data/doc/cxxapi/ContentHandler_8h-source.html +1 -1
  14. data/doc/cxxapi/DirectoryMapper_8h-source.html +10 -9
  15. data/doc/cxxapi/EventedServer_8h-source.html +415 -0
  16. data/doc/cxxapi/Exceptions_8h-source.html +1 -1
  17. data/doc/cxxapi/FileDescriptor_8h-source.html +1 -1
  18. data/doc/cxxapi/Hooks_8h-source.html +3 -2
  19. data/doc/cxxapi/HttpStatusExtractor_8h-source.html +324 -323
  20. data/doc/cxxapi/Logging_8h-source.html +643 -546
  21. data/doc/cxxapi/MessageChannel_8h-source.html +429 -404
  22. data/doc/cxxapi/MessageClient_8h-source.html +1 -1
  23. data/doc/cxxapi/MessageReadersWriters_8h-source.html +451 -0
  24. data/doc/cxxapi/MessageServer_8h-source.html +1 -1
  25. data/doc/cxxapi/PoolOptions_8h-source.html +287 -279
  26. data/doc/cxxapi/Process_8h-source.html +178 -167
  27. data/doc/cxxapi/RandomGenerator_8h-source.html +45 -18
  28. data/doc/cxxapi/ResourceLocator_8h-source.html +3 -3
  29. data/doc/cxxapi/ScgiRequestParser_8h-source.html +344 -343
  30. data/doc/cxxapi/ServerInstanceDir_8h-source.html +1 -1
  31. data/doc/cxxapi/Session_8h-source.html +387 -374
  32. data/doc/cxxapi/SpawnManager_8h-source.html +547 -538
  33. data/doc/cxxapi/StaticContentHandler_8h-source.html +1 -1
  34. data/doc/cxxapi/StaticString_8h-source.html +1 -1
  35. data/doc/cxxapi/StringListCreator_8h-source.html +1 -1
  36. data/doc/cxxapi/Utils_8h-source.html +545 -520
  37. data/doc/cxxapi/annotated.html +11 -8
  38. data/doc/cxxapi/apache2_2Configuration_8h-source.html +1 -1
  39. data/doc/cxxapi/classAgentWatcher-members.html +1 -1
  40. data/doc/cxxapi/classAgentWatcher.html +1 -1
  41. data/doc/cxxapi/classClient-members.html +1 -1
  42. data/doc/cxxapi/classClient.html +1 -1
  43. data/doc/cxxapi/classHooks-members.html +16 -13
  44. data/doc/cxxapi/classHooks.html +69 -73
  45. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager-members.html +1 -1
  46. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager.html +1 -1
  47. data/doc/cxxapi/classPassenger_1_1ArgumentException-members.html +1 -1
  48. data/doc/cxxapi/classPassenger_1_1ArgumentException.html +1 -1
  49. data/doc/cxxapi/classPassenger_1_1ArrayReader-members.html +33 -0
  50. data/doc/cxxapi/classPassenger_1_1ArrayReader.html +47 -0
  51. data/doc/cxxapi/classPassenger_1_1BufferedUpload-members.html +1 -1
  52. data/doc/cxxapi/classPassenger_1_1BufferedUpload.html +1 -1
  53. data/doc/cxxapi/classPassenger_1_1BusyException-members.html +1 -1
  54. data/doc/cxxapi/classPassenger_1_1BusyException.html +1 -1
  55. data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +1 -1
  56. data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +1 -1
  57. data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +18 -15
  58. data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +89 -99
  59. data/doc/cxxapi/classPassenger_1_1EOFException-members.html +1 -1
  60. data/doc/cxxapi/classPassenger_1_1EOFException.html +1 -1
  61. data/doc/cxxapi/classPassenger_1_1EventFd-members.html +1 -1
  62. data/doc/cxxapi/classPassenger_1_1EventFd.html +1 -1
  63. data/doc/cxxapi/classPassenger_1_1FileDescriptor-members.html +1 -1
  64. data/doc/cxxapi/classPassenger_1_1FileDescriptor.html +1 -1
  65. data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +1 -1
  66. data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +1 -1
  67. data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +1 -1
  68. data/doc/cxxapi/classPassenger_1_1FileSystemException.html +1 -1
  69. data/doc/cxxapi/classPassenger_1_1HttpStatusExtractor-members.html +1 -1
  70. data/doc/cxxapi/classPassenger_1_1HttpStatusExtractor.html +2 -2
  71. data/doc/cxxapi/classPassenger_1_1IOException-members.html +1 -1
  72. data/doc/cxxapi/classPassenger_1_1IOException.html +1 -1
  73. data/doc/cxxapi/classPassenger_1_1MemZeroGuard-members.html +1 -1
  74. data/doc/cxxapi/classPassenger_1_1MemZeroGuard.html +1 -1
  75. data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +1 -1
  76. data/doc/cxxapi/classPassenger_1_1MessageChannel.html +1 -1
  77. data/doc/cxxapi/classPassenger_1_1MessageServer-members.html +1 -1
  78. data/doc/cxxapi/classPassenger_1_1MessageServer.html +1 -1
  79. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext-members.html +1 -1
  80. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext.html +1 -1
  81. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext-members.html +1 -1
  82. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext.html +1 -1
  83. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler-members.html +1 -1
  84. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler.html +1 -1
  85. data/doc/cxxapi/classPassenger_1_1Process-members.html +4 -3
  86. data/doc/cxxapi/classPassenger_1_1Process.html +40 -9
  87. data/doc/cxxapi/classPassenger_1_1RandomGenerator-members.html +2 -1
  88. data/doc/cxxapi/classPassenger_1_1RandomGenerator.html +29 -2
  89. data/doc/cxxapi/classPassenger_1_1RuntimeException-members.html +1 -1
  90. data/doc/cxxapi/classPassenger_1_1RuntimeException.html +1 -1
  91. data/doc/cxxapi/classPassenger_1_1ScalarReader-members.html +33 -0
  92. data/doc/cxxapi/classPassenger_1_1ScalarReader.html +47 -0
  93. data/doc/cxxapi/classPassenger_1_1ScgiRequestParser-members.html +1 -1
  94. data/doc/cxxapi/classPassenger_1_1ScgiRequestParser.html +1 -1
  95. data/doc/cxxapi/classPassenger_1_1SecurityException-members.html +1 -1
  96. data/doc/cxxapi/classPassenger_1_1SecurityException.html +1 -1
  97. data/doc/cxxapi/classPassenger_1_1Session-members.html +1 -1
  98. data/doc/cxxapi/classPassenger_1_1Session.html +2 -2
  99. data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +1 -1
  100. data/doc/cxxapi/classPassenger_1_1SpawnException.html +1 -1
  101. data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +2 -2
  102. data/doc/cxxapi/classPassenger_1_1SpawnManager.html +6 -18
  103. data/doc/cxxapi/classPassenger_1_1StandardSession-members.html +1 -1
  104. data/doc/cxxapi/classPassenger_1_1StandardSession.html +1 -1
  105. data/doc/cxxapi/classPassenger_1_1StaticString-members.html +1 -1
  106. data/doc/cxxapi/classPassenger_1_1StaticString.html +1 -1
  107. data/doc/cxxapi/classPassenger_1_1SystemException-members.html +1 -1
  108. data/doc/cxxapi/classPassenger_1_1SystemException.html +1 -1
  109. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException-members.html +1 -1
  110. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException.html +1 -1
  111. data/doc/cxxapi/classPassenger_1_1TimeoutException-members.html +1 -1
  112. data/doc/cxxapi/classPassenger_1_1TimeoutException.html +1 -1
  113. data/doc/cxxapi/classPassenger_1_1Uint16Reader-members.html +33 -0
  114. data/doc/cxxapi/classPassenger_1_1Uint16Reader.html +47 -0
  115. data/doc/cxxapi/classPassenger_1_1Uint32Reader-members.html +33 -0
  116. data/doc/cxxapi/classPassenger_1_1Uint32Reader.html +47 -0
  117. data/doc/cxxapi/classServer-members.html +1 -1
  118. data/doc/cxxapi/classServer.html +1 -1
  119. data/doc/cxxapi/classServerInstanceDirToucher-members.html +1 -1
  120. data/doc/cxxapi/classServerInstanceDirToucher.html +1 -1
  121. data/doc/cxxapi/classes.html +13 -10
  122. data/doc/cxxapi/definitions_8h-source.html +2 -1
  123. data/doc/cxxapi/doxygen.css +91 -0
  124. data/doc/cxxapi/files.html +16 -13
  125. data/doc/cxxapi/functions.html +32 -21
  126. data/doc/cxxapi/functions_enum.html +1 -1
  127. data/doc/cxxapi/functions_eval.html +1 -1
  128. data/doc/cxxapi/functions_func.html +32 -21
  129. data/doc/cxxapi/functions_vars.html +3 -1
  130. data/doc/cxxapi/graph_legend.html +20 -15
  131. data/doc/cxxapi/graph_legend.png +0 -0
  132. data/doc/cxxapi/group__Configuration.html +51 -64
  133. data/doc/cxxapi/group__Configuration.png +0 -0
  134. data/doc/cxxapi/group__Core.html +24 -26
  135. data/doc/cxxapi/group__Core.png +0 -0
  136. data/doc/cxxapi/group__Exceptions.html +1 -1
  137. data/doc/cxxapi/group__Hooks.html +17 -15
  138. data/doc/cxxapi/group__Hooks.png +0 -0
  139. data/doc/cxxapi/group__Support.html +11 -9
  140. data/doc/cxxapi/hierarchy.html +6 -1
  141. data/doc/cxxapi/index.html +10 -5
  142. data/doc/cxxapi/inherit__graph__10.map +1 -1
  143. data/doc/cxxapi/inherit__graph__10.md5 +1 -1
  144. data/doc/cxxapi/inherit__graph__10.png +0 -0
  145. data/doc/cxxapi/inherit__graph__11.map +1 -1
  146. data/doc/cxxapi/inherit__graph__11.md5 +1 -1
  147. data/doc/cxxapi/inherit__graph__11.png +0 -0
  148. data/doc/cxxapi/inherit__graph__12.map +1 -1
  149. data/doc/cxxapi/inherit__graph__12.md5 +1 -1
  150. data/doc/cxxapi/inherit__graph__12.png +0 -0
  151. data/doc/cxxapi/inherit__graph__13.map +1 -1
  152. data/doc/cxxapi/inherit__graph__13.md5 +1 -1
  153. data/doc/cxxapi/inherit__graph__13.png +0 -0
  154. data/doc/cxxapi/inherit__graph__14.map +1 -3
  155. data/doc/cxxapi/inherit__graph__14.md5 +1 -1
  156. data/doc/cxxapi/inherit__graph__14.png +0 -0
  157. data/doc/cxxapi/inherit__graph__15.map +1 -1
  158. data/doc/cxxapi/inherit__graph__15.md5 +1 -1
  159. data/doc/cxxapi/inherit__graph__15.png +0 -0
  160. data/doc/cxxapi/inherit__graph__16.map +3 -1
  161. data/doc/cxxapi/inherit__graph__16.md5 +1 -1
  162. data/doc/cxxapi/inherit__graph__16.png +0 -0
  163. data/doc/cxxapi/inherit__graph__17.map +1 -1
  164. data/doc/cxxapi/inherit__graph__17.md5 +1 -1
  165. data/doc/cxxapi/inherit__graph__17.png +0 -0
  166. data/doc/cxxapi/inherit__graph__18.map +1 -2
  167. data/doc/cxxapi/inherit__graph__18.md5 +1 -1
  168. data/doc/cxxapi/inherit__graph__18.png +0 -0
  169. data/doc/cxxapi/inherit__graph__19.map +1 -1
  170. data/doc/cxxapi/inherit__graph__19.md5 +1 -1
  171. data/doc/cxxapi/inherit__graph__19.png +0 -0
  172. data/doc/cxxapi/inherit__graph__20.map +2 -1
  173. data/doc/cxxapi/inherit__graph__20.md5 +1 -1
  174. data/doc/cxxapi/inherit__graph__20.png +0 -0
  175. data/doc/cxxapi/inherit__graph__21.map +1 -1
  176. data/doc/cxxapi/inherit__graph__21.md5 +1 -1
  177. data/doc/cxxapi/inherit__graph__21.png +0 -0
  178. data/doc/cxxapi/inherit__graph__22.map +1 -1
  179. data/doc/cxxapi/inherit__graph__22.md5 +1 -1
  180. data/doc/cxxapi/inherit__graph__22.png +0 -0
  181. data/doc/cxxapi/inherit__graph__23.map +1 -1
  182. data/doc/cxxapi/inherit__graph__23.md5 +1 -1
  183. data/doc/cxxapi/inherit__graph__23.png +0 -0
  184. data/doc/cxxapi/inherit__graph__24.map +1 -1
  185. data/doc/cxxapi/inherit__graph__24.md5 +1 -1
  186. data/doc/cxxapi/inherit__graph__24.png +0 -0
  187. data/doc/cxxapi/inherit__graph__25.map +1 -1
  188. data/doc/cxxapi/inherit__graph__25.md5 +1 -1
  189. data/doc/cxxapi/inherit__graph__25.png +0 -0
  190. data/doc/cxxapi/inherit__graph__26.map +1 -1
  191. data/doc/cxxapi/inherit__graph__26.md5 +1 -1
  192. data/doc/cxxapi/inherit__graph__26.png +0 -0
  193. data/doc/cxxapi/inherit__graph__27.map +1 -2
  194. data/doc/cxxapi/inherit__graph__27.md5 +1 -1
  195. data/doc/cxxapi/inherit__graph__27.png +0 -0
  196. data/doc/cxxapi/inherit__graph__28.map +1 -1
  197. data/doc/cxxapi/inherit__graph__28.md5 +1 -1
  198. data/doc/cxxapi/inherit__graph__28.png +0 -0
  199. data/doc/cxxapi/inherit__graph__29.map +1 -1
  200. data/doc/cxxapi/inherit__graph__29.md5 +1 -1
  201. data/doc/cxxapi/inherit__graph__29.png +0 -0
  202. data/doc/cxxapi/inherit__graph__30.map +2 -1
  203. data/doc/cxxapi/inherit__graph__30.md5 +1 -1
  204. data/doc/cxxapi/inherit__graph__30.png +0 -0
  205. data/doc/cxxapi/inherit__graph__31.map +1 -3
  206. data/doc/cxxapi/inherit__graph__31.md5 +1 -1
  207. data/doc/cxxapi/inherit__graph__31.png +0 -0
  208. data/doc/cxxapi/inherit__graph__32.map +1 -1
  209. data/doc/cxxapi/inherit__graph__32.md5 +1 -1
  210. data/doc/cxxapi/inherit__graph__32.png +0 -0
  211. data/doc/cxxapi/inherit__graph__33.map +1 -1
  212. data/doc/cxxapi/inherit__graph__33.md5 +1 -1
  213. data/doc/cxxapi/inherit__graph__33.png +0 -0
  214. data/doc/cxxapi/inherit__graph__34.map +3 -1
  215. data/doc/cxxapi/inherit__graph__34.md5 +1 -1
  216. data/doc/cxxapi/inherit__graph__34.png +0 -0
  217. data/doc/cxxapi/inherit__graph__35.map +1 -1
  218. data/doc/cxxapi/inherit__graph__35.md5 +1 -1
  219. data/doc/cxxapi/inherit__graph__35.png +0 -0
  220. data/doc/cxxapi/inherit__graph__36.map +1 -1
  221. data/doc/cxxapi/inherit__graph__36.md5 +1 -1
  222. data/doc/cxxapi/inherit__graph__36.png +0 -0
  223. data/doc/cxxapi/inherit__graph__37.map +1 -0
  224. data/doc/cxxapi/inherit__graph__37.md5 +1 -0
  225. data/doc/cxxapi/inherit__graph__37.png +0 -0
  226. data/doc/cxxapi/inherit__graph__38.map +1 -0
  227. data/doc/cxxapi/inherit__graph__38.md5 +1 -0
  228. data/doc/cxxapi/inherit__graph__38.png +0 -0
  229. data/doc/cxxapi/inherit__graph__39.map +1 -0
  230. data/doc/cxxapi/inherit__graph__39.md5 +1 -0
  231. data/doc/cxxapi/inherit__graph__39.png +0 -0
  232. data/doc/cxxapi/inherit__graph__5.map +1 -1
  233. data/doc/cxxapi/inherit__graph__5.md5 +1 -1
  234. data/doc/cxxapi/inherit__graph__5.png +0 -0
  235. data/doc/cxxapi/inherit__graph__6.map +1 -1
  236. data/doc/cxxapi/inherit__graph__6.md5 +1 -1
  237. data/doc/cxxapi/inherit__graph__6.png +0 -0
  238. data/doc/cxxapi/inherit__graph__7.map +1 -1
  239. data/doc/cxxapi/inherit__graph__7.md5 +1 -1
  240. data/doc/cxxapi/inherit__graph__7.png +0 -0
  241. data/doc/cxxapi/inherit__graph__8.map +1 -1
  242. data/doc/cxxapi/inherit__graph__8.md5 +1 -1
  243. data/doc/cxxapi/inherit__graph__8.png +0 -0
  244. data/doc/cxxapi/inherit__graph__9.map +1 -1
  245. data/doc/cxxapi/inherit__graph__9.md5 +1 -1
  246. data/doc/cxxapi/inherit__graph__9.png +0 -0
  247. data/doc/cxxapi/inherits.html +46 -31
  248. data/doc/cxxapi/main.html +12 -11
  249. data/doc/cxxapi/modules.html +16 -13
  250. data/doc/cxxapi/namespacePassenger.html +82 -5
  251. data/doc/cxxapi/namespacemembers.html +5 -3
  252. data/doc/cxxapi/namespacemembers_enum.html +1 -1
  253. data/doc/cxxapi/namespacemembers_eval.html +1 -1
  254. data/doc/cxxapi/namespacemembers_func.html +5 -3
  255. data/doc/cxxapi/namespacemembers_type.html +1 -1
  256. data/doc/cxxapi/namespaces.html +2 -2
  257. data/doc/cxxapi/nginx_2Configuration_8h-source.html +43 -42
  258. data/doc/cxxapi/ngx__http__passenger__module_8h-source.html +1 -1
  259. data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +1 -1
  260. data/doc/cxxapi/structPassenger_1_1AnythingToString.html +1 -1
  261. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01StaticString_01_4_01_4-members.html +33 -0
  262. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01StaticString_01_4_01_4.html +52 -0
  263. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +1 -1
  264. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +1 -1
  265. data/doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard-members.html +1 -1
  266. data/doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard.html +1 -1
  267. data/doc/cxxapi/structPassenger_1_1PoolOptions-members.html +3 -2
  268. data/doc/cxxapi/structPassenger_1_1PoolOptions.html +25 -5
  269. data/doc/cxxapi/structPassenger_1_1StaticString_1_1Hash-members.html +1 -1
  270. data/doc/cxxapi/structPassenger_1_1StaticString_1_1Hash.html +1 -1
  271. data/doc/cxxapi/tabs.css +1 -1
  272. data/doc/cxxapi/tree.html +20 -17
  273. data/doc/users_guide_snippets/tips.txt +28 -0
  274. data/ext/apache2/Hooks.cpp +19 -2
  275. data/ext/common/Utils.cpp +15 -4
  276. data/ext/common/Version.h +1 -1
  277. data/ext/nginx/StaticContentHandler.c +6 -3
  278. data/ext/phusion_passenger/native_support.c +25 -0
  279. data/lib/phusion_passenger/abstract_request_handler.rb +1 -0
  280. data/lib/phusion_passenger/constants.rb +1 -1
  281. data/lib/phusion_passenger/events.rb +3 -0
  282. data/lib/phusion_passenger/platform_info.rb +2 -1
  283. data/lib/phusion_passenger/rack/application_spawner.rb +2 -0
  284. data/lib/phusion_passenger/railz/application_spawner.rb +8 -0
  285. data/lib/phusion_passenger/utils.rb +69 -9
  286. data/lib/phusion_passenger/utils/rewindable_input.rb +10 -6
  287. metadata +55 -17
@@ -316,6 +316,7 @@ private
316
316
  end
317
317
  end
318
318
  trap('HUP', IGNORE)
319
+ PhusionPassenger.call_event(:after_installing_signal_handlers)
319
320
  end
320
321
 
321
322
  def install_useful_signal_handlers
@@ -24,7 +24,7 @@
24
24
  module PhusionPassenger
25
25
  # Phusion Passenger version number.
26
26
  # Don't forget to edit ext/common/Version.h too.
27
- VERSION_STRING = '2.2.11'
27
+ VERSION_STRING = '2.2.12'
28
28
 
29
29
  DEFAULT_FRAMEWORK_SPAWNER_MAX_IDLE_TIME = 30 * 60
30
30
  DEFAULT_APP_SPAWNER_MAX_IDLE_TIME = 10 * 60
@@ -24,6 +24,7 @@
24
24
  module PhusionPassenger
25
25
  @@event_starting_worker_process = []
26
26
  @@event_stopping_worker_process = []
27
+ @@after_installing_signal_handlers = []
27
28
 
28
29
  def self.on_event(name, &block)
29
30
  callback_list_for_event(name) << block
@@ -42,6 +43,8 @@ private
42
43
  @@event_starting_worker_process
43
44
  when :stopping_worker_process
44
45
  @@event_stopping_worker_process
46
+ when :after_installing_signal_handlers
47
+ @@after_installing_signal_handlers
45
48
  else
46
49
  raise ArgumentError, "Unknown event name '#{name}'"
47
50
  end
@@ -346,9 +346,10 @@ public
346
346
  flags << '-DBOOST_HAS_STDINT_H -D_GLIBCPP__PTHREADS'
347
347
  elsif RUBY_PLATFORM =~ /aix/
348
348
  flags << '-DOXT_DISABLE_BACKTRACES'
349
- elsif RUBY_PLATFORM =~ /(sparc-linux|arm-linux|sh4-linux)/
349
+ elsif RUBY_PLATFORM =~ /(sparc-linux|arm-linux|^arm.*-linux|sh4-linux)/
350
350
  # http://code.google.com/p/phusion-passenger/issues/detail?id=200
351
351
  # http://groups.google.com/group/phusion-passenger/t/6b904a962ee28e5c
352
+ # http://groups.google.com/group/phusion-passenger/browse_thread/thread/aad4bd9d8d200561
352
353
  flags << '-DBOOST_SP_USE_PTHREADS'
353
354
  end
354
355
  return flags.compact.join(" ").strip
@@ -86,6 +86,7 @@ private
86
86
  app = nil
87
87
  success = report_app_init_status(channel) do
88
88
  ENV['RACK_ENV'] = options["environment"]
89
+ ENV['RAILS_ENV'] = options["environment"]
89
90
  if options["base_uri"] && options["base_uri"] != "/"
90
91
  ENV['RACK_BASE_URI'] = options["base_uri"]
91
92
  ENV['RAILS_RELATIVE_URL_ROOT'] = options["base_uri"]
@@ -101,6 +102,7 @@ private
101
102
  # that have been set now (e.g. $HOME, $GEM_HOME, etc) and that
102
103
  # it is able to detect newly installed gems.
103
104
  Gem.clear_paths
105
+ setup_bundler_support
104
106
  app = load_rack_app
105
107
  end
106
108
 
@@ -161,6 +161,7 @@ class ApplicationSpawner < AbstractServer
161
161
  channel = MessageChannel.new(b)
162
162
  success = report_app_init_status(channel) do
163
163
  ENV['RAILS_ENV'] = @environment
164
+ ENV['RACK_ENV'] = @environment
164
165
  ENV['RAILS_RELATIVE_URL_ROOT'] = @base_uri
165
166
  Dir.chdir(@app_root)
166
167
  if @encoded_environment_variables
@@ -173,6 +174,7 @@ class ApplicationSpawner < AbstractServer
173
174
  # that have been set now (e.g. $HOME, $GEM_HOME, etc) and that
174
175
  # it is able to detect newly installed gems.
175
176
  Gem.clear_paths
177
+ setup_bundler_support
176
178
 
177
179
  require File.expand_path('config/environment')
178
180
  require 'dispatcher'
@@ -237,6 +239,7 @@ protected
237
239
  report_app_init_status(client) do
238
240
  $0 = "Passenger ApplicationSpawner: #{@app_root}"
239
241
  ENV['RAILS_ENV'] = @environment
242
+ ENV['RACK_ENV'] = @environment
240
243
  ENV['RAILS_RELATIVE_URL_ROOT'] = @base_uri
241
244
  if defined?(RAILS_ENV)
242
245
  Object.send(:remove_const, :RAILS_ENV)
@@ -249,6 +252,11 @@ protected
249
252
  if @lower_privilege
250
253
  lower_privilege('config/environment.rb', @lowest_user)
251
254
  end
255
+ # Make sure RubyGems uses any new environment variable values
256
+ # that have been set now (e.g. $HOME, $GEM_HOME, etc) and that
257
+ # it is able to detect newly installed gems.
258
+ Gem.clear_paths
259
+ setup_bundler_support
252
260
  preload_application
253
261
  end
254
262
  end
@@ -32,6 +32,7 @@ require 'etc'
32
32
  require 'fcntl'
33
33
  require 'tempfile'
34
34
  require 'stringio'
35
+ require 'phusion_passenger/packaging'
35
36
  require 'phusion_passenger/exceptions'
36
37
  if !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby"
37
38
  require 'phusion_passenger/native_support'
@@ -163,6 +164,73 @@ protected
163
164
  end
164
165
  end
165
166
 
167
+ def setup_bundler_support(options = {})
168
+ # Rack::ApplicationSpawner depends on the 'rack' library, but the app
169
+ # might want us to use a bundled version instead of a
170
+ # gem/apt-get/yum/whatever-installed version. Therefore we must setup
171
+ # the correct load paths before requiring 'rack'.
172
+ #
173
+ # The most popular tool for bundling dependencies is Bundler. Bundler
174
+ # works as follows:
175
+ # - If the bundle is locked then a file .bundle/environment.rb exists
176
+ # which will setup the load paths.
177
+ # - If the bundle is not locked then the load paths must be set up by
178
+ # calling Bundler.setup.
179
+ # - Rails 3's boot.rb automatically loads .bundle/environment.rb or
180
+ # calls Bundler.setup if that's not available.
181
+ # - Other Rack apps might not have a boot.rb but we still want to setup
182
+ # Bundler.
183
+ # - Some Rails 2 apps might have explicitly added Bundler support.
184
+ # These apps call Bundler.setup in their preinitializer.rb.
185
+ #
186
+ # So the strategy is as follows:
187
+
188
+ # Our strategy might be completely unsuitable for the app or the
189
+ # developer is using something other than Bundler (or possibly an
190
+ # older version of Bundler which is API incompatible with the latest
191
+ # version), so we let the user manually specify a load path setup file.
192
+ if options["load_path_setup_file"]
193
+ require File.expand(options["load_path_setup_file"])
194
+
195
+ # The app developer may also override our strategy with this magic file.
196
+ elsif File.exist?('config/setup_load_paths.rb')
197
+ require File.expand('config/setup_load_paths')
198
+
199
+ # If the Bundler lock environment file exists then load that. If it
200
+ # exists then there's a 99.9% chance that loading it is the correct
201
+ # thing to do.
202
+ elsif File.exist?('.bundle/environment.rb')
203
+ require File.expand_path('.bundle/environment')
204
+
205
+ # If the Bundler environment file doesn't exist then there are two
206
+ # possibilities:
207
+ # 1. Bundler is not used, in which case we don't have to do anything.
208
+ # 2. Bundler *is* used, but the gems are not locked and we're supposed
209
+ # to call Bundler.setup.
210
+ #
211
+ # The existence of Gemfile indicates whether (2) is true:
212
+ elsif File.exist?('Gemfile')
213
+ # In case of Rails 3, config/boot.rb already calls Bundler.setup.
214
+ # However older versions of Rails may not so loading boot.rb might
215
+ # not be the correct thing to do. To be on the safe side we
216
+ # call Bundler.setup ourselves; calling Bundler.setup twice is
217
+ # harmless. If this isn't the correct thing to do after all then
218
+ # there's always the load_path_setup_file option and
219
+ # setup_load_paths.rb.
220
+ require 'rubygems'
221
+ require 'bundler'
222
+ Bundler.setup
223
+ end
224
+
225
+ # Bundler might remove Phusion Passenger from the load path in its zealous
226
+ # attempt to un-require RubyGems, so here we put Phusion Passenger back
227
+ # into the load path.
228
+ if $LOAD_PATH.first != LIBDIR
229
+ $LOAD_PATH.unshift(LIBDIR)
230
+ $LOAD_PATH.uniq!
231
+ end
232
+ end
233
+
166
234
  # Fork a new process and run the given block inside the child process, just like
167
235
  # fork(). Unlike fork(), this method is safe, i.e. there's no way for the child
168
236
  # process to escape the block. Any uncaught exceptions in the child process will
@@ -371,15 +439,7 @@ protected
371
439
  if uid == 0
372
440
  return false
373
441
  else
374
- # Some systems are broken. initgroups can fail because of
375
- # all kinds of stupid reasons. So we ignore any errors
376
- # raised by initgroups.
377
- begin
378
- Process.groups = Process.initgroups(username, gid)
379
- rescue
380
- end
381
- Process::Sys.setgid(gid)
382
- Process::Sys.setuid(uid)
442
+ NativeSupport.switch_user(username, uid, gid)
383
443
  ENV['HOME'] = pw.dir
384
444
  return true
385
445
  end
@@ -64,12 +64,16 @@ module Utils
64
64
 
65
65
  private
66
66
 
67
- # Ruby's Tempfile class has a bug. Subclass it and fix it.
68
- class Tempfile < ::Tempfile
69
- def _close
70
- @tmpfile.close if @tmpfile
71
- @data[1] = nil if @data
72
- @tmpfile = nil
67
+ if RUBY_VERSION < '1.9.0'
68
+ # Many Ruby 1.8's tempfile libraries have a bug that can cause
69
+ # the #close method to raise an exception. Subclass it and fix
70
+ # it.
71
+ class Tempfile < ::Tempfile
72
+ def _close
73
+ @tmpfile.close if @tmpfile
74
+ @data[1] = nil if @data
75
+ @tmpfile = nil
76
+ end
73
77
  end
74
78
  end
75
79
 
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.11
4
+ prerelease: false
5
+ segments:
6
+ - 2
7
+ - 2
8
+ - 12
9
+ version: 2.2.12
5
10
  platform: ruby
6
11
  authors:
7
12
  - Phusion - http://www.phusion.nl/
@@ -9,39 +14,49 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-03-05 00:00:00 +01:00
17
+ date: 2010-05-31 00:00:00 +02:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: rake
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ - 8
30
+ - 1
23
31
  version: 0.8.1
24
- version:
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: fastthread
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
30
38
  requirements:
31
39
  - - ">="
32
40
  - !ruby/object:Gem::Version
41
+ segments:
42
+ - 1
43
+ - 0
44
+ - 1
33
45
  version: 1.0.1
34
- version:
46
+ type: :runtime
47
+ version_requirements: *id002
35
48
  - !ruby/object:Gem::Dependency
36
49
  name: rack
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
40
52
  requirements:
41
53
  - - ">="
42
54
  - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
43
57
  version: "0"
44
- version:
58
+ type: :runtime
59
+ version_requirements: *id003
45
60
  description: Passenger is an Apache module for Ruby on Rails support.
46
61
  email: info@phusion.nl
47
62
  executables:
@@ -167,6 +182,8 @@ files:
167
182
  - doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.png
168
183
  - doc/cxxapi/classPassenger_1_1ArgumentException-members.html
169
184
  - doc/cxxapi/classPassenger_1_1ArgumentException.html
185
+ - doc/cxxapi/classPassenger_1_1ArrayReader-members.html
186
+ - doc/cxxapi/classPassenger_1_1ArrayReader.html
170
187
  - doc/cxxapi/classPassenger_1_1BacktracesServer-members.html
171
188
  - doc/cxxapi/classPassenger_1_1BacktracesServer.html
172
189
  - doc/cxxapi/classPassenger_1_1BacktracesServer__inherit__graph.map
@@ -235,6 +252,8 @@ files:
235
252
  - doc/cxxapi/classPassenger_1_1RandomGenerator.html
236
253
  - doc/cxxapi/classPassenger_1_1RuntimeException-members.html
237
254
  - doc/cxxapi/classPassenger_1_1RuntimeException.html
255
+ - doc/cxxapi/classPassenger_1_1ScalarReader-members.html
256
+ - doc/cxxapi/classPassenger_1_1ScalarReader.html
238
257
  - doc/cxxapi/classPassenger_1_1ScgiRequestParser-members.html
239
258
  - doc/cxxapi/classPassenger_1_1ScgiRequestParser.html
240
259
  - doc/cxxapi/classPassenger_1_1SecurityException-members.html
@@ -274,6 +293,10 @@ files:
274
293
  - doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.map
275
294
  - doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.md5
276
295
  - doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.png
296
+ - doc/cxxapi/classPassenger_1_1Uint16Reader-members.html
297
+ - doc/cxxapi/classPassenger_1_1Uint16Reader.html
298
+ - doc/cxxapi/classPassenger_1_1Uint32Reader-members.html
299
+ - doc/cxxapi/classPassenger_1_1Uint32Reader.html
277
300
  - doc/cxxapi/classServer-members.html
278
301
  - doc/cxxapi/classServer.html
279
302
  - doc/cxxapi/classServerInstanceDirToucher-members.html
@@ -285,6 +308,7 @@ files:
285
308
  - doc/cxxapi/DirectoryMapper_8h-source.html
286
309
  - doc/cxxapi/doxygen.css
287
310
  - doc/cxxapi/doxygen.png
311
+ - doc/cxxapi/EventedServer_8h-source.html
288
312
  - doc/cxxapi/Exceptions_8h-source.html
289
313
  - doc/cxxapi/FileChangeChecker_8h-source.html
290
314
  - doc/cxxapi/FileDescriptor_8h-source.html
@@ -414,6 +438,15 @@ files:
414
438
  - doc/cxxapi/inherit__graph__36.map
415
439
  - doc/cxxapi/inherit__graph__36.md5
416
440
  - doc/cxxapi/inherit__graph__36.png
441
+ - doc/cxxapi/inherit__graph__37.map
442
+ - doc/cxxapi/inherit__graph__37.md5
443
+ - doc/cxxapi/inherit__graph__37.png
444
+ - doc/cxxapi/inherit__graph__38.map
445
+ - doc/cxxapi/inherit__graph__38.md5
446
+ - doc/cxxapi/inherit__graph__38.png
447
+ - doc/cxxapi/inherit__graph__39.map
448
+ - doc/cxxapi/inherit__graph__39.md5
449
+ - doc/cxxapi/inherit__graph__39.png
417
450
  - doc/cxxapi/inherit__graph__4.map
418
451
  - doc/cxxapi/inherit__graph__4.md5
419
452
  - doc/cxxapi/inherit__graph__4.png
@@ -439,6 +472,7 @@ files:
439
472
  - doc/cxxapi/md5_8h-source.html
440
473
  - doc/cxxapi/MessageChannel_8h-source.html
441
474
  - doc/cxxapi/MessageClient_8h-source.html
475
+ - doc/cxxapi/MessageReadersWriters_8h-source.html
442
476
  - doc/cxxapi/MessageServer_8h-source.html
443
477
  - doc/cxxapi/modules.html
444
478
  - doc/cxxapi/namespacemembers.html
@@ -463,6 +497,8 @@ files:
463
497
  - doc/cxxapi/StringListCreator_8h-source.html
464
498
  - doc/cxxapi/structPassenger_1_1AnythingToString-members.html
465
499
  - doc/cxxapi/structPassenger_1_1AnythingToString.html
500
+ - doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01StaticString_01_4_01_4-members.html
501
+ - doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01StaticString_01_4_01_4.html
466
502
  - doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html
467
503
  - doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html
468
504
  - doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard-members.html
@@ -1336,19 +1372,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
1336
1372
  requirements:
1337
1373
  - - ">="
1338
1374
  - !ruby/object:Gem::Version
1375
+ segments:
1376
+ - 0
1339
1377
  version: "0"
1340
- version:
1341
1378
  required_rubygems_version: !ruby/object:Gem::Requirement
1342
1379
  requirements:
1343
1380
  - - ">="
1344
1381
  - !ruby/object:Gem::Version
1382
+ segments:
1383
+ - 0
1345
1384
  version: "0"
1346
- version:
1347
1385
  requirements:
1348
1386
  - fastthread
1349
1387
  - Apache 2 with development headers
1350
1388
  rubyforge_project: passenger
1351
- rubygems_version: 1.3.5
1389
+ rubygems_version: 1.3.6
1352
1390
  signing_key:
1353
1391
  specification_version: 3
1354
1392
  summary: Apache module for Ruby on Rails support.