passenger 2.2.9 → 2.2.10

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 (435) hide show
  1. data/NEWS +10 -0
  2. data/doc/Architectural overview.html +202 -65
  3. data/doc/Security of user switching support.html +200 -63
  4. data/doc/Users guide Apache.html +266 -129
  5. data/doc/Users guide Nginx.html +234 -97
  6. data/doc/cxxapi/AbstractSpawnManager_8h-source.html +138 -0
  7. data/doc/cxxapi/Account_8h-source.html +202 -0
  8. data/doc/cxxapi/AccountsDatabase_8h-source.html +158 -0
  9. data/doc/cxxapi/AgentsStarter_8h-source.html +79 -0
  10. data/doc/cxxapi/BCrypt_8h-source.html +101 -0
  11. data/doc/cxxapi/BacktracesServer_8h-source.html +87 -0
  12. data/doc/cxxapi/Base64_8h-source.html +85 -0
  13. data/doc/cxxapi/Blowfish_8h-source.html +131 -0
  14. data/doc/cxxapi/Bucket_8h-source.html +1 -1
  15. data/doc/cxxapi/CachedFileStat_8h-source.html +49 -157
  16. data/doc/cxxapi/Configuration_8h-source.html +1 -1
  17. data/doc/cxxapi/Constants_8h-source.html +71 -0
  18. data/doc/cxxapi/ContentHandler_8h-source.html +92 -0
  19. data/doc/cxxapi/DirectoryMapper_8h-source.html +1 -1
  20. data/doc/cxxapi/Exceptions_8h-source.html +332 -236
  21. data/doc/cxxapi/FileChangeChecker_8h-source.html +237 -0
  22. data/doc/cxxapi/FileDescriptor_8h-source.html +206 -0
  23. data/doc/cxxapi/Hooks_8h-source.html +1 -1
  24. data/doc/cxxapi/HttpStatusExtractor_8h-source.html +378 -0
  25. data/doc/cxxapi/LoggingServer_8h-source.html +165 -0
  26. data/doc/cxxapi/Logging_8h-source.html +580 -112
  27. data/doc/cxxapi/MessageChannel_8h-source.html +789 -599
  28. data/doc/cxxapi/MessageClient_8h-source.html +297 -0
  29. data/doc/cxxapi/MessageServer_8h-source.html +607 -0
  30. data/doc/cxxapi/PoolOptions_8h-source.html +471 -278
  31. data/doc/cxxapi/Process_8h-source.html +272 -0
  32. data/doc/cxxapi/RandomGenerator_8h-source.html +156 -0
  33. data/doc/cxxapi/ResourceLocator_8h-source.html +104 -0
  34. data/doc/cxxapi/ScgiRequestParser_8h-source.html +399 -0
  35. data/doc/cxxapi/ServerInstanceDir_8h-source.html +356 -0
  36. data/doc/cxxapi/Session_8h-source.html +483 -0
  37. data/doc/cxxapi/SpawnManager_8h-source.html +590 -546
  38. data/doc/cxxapi/StaticContentHandler_8h-source.html +65 -0
  39. data/doc/cxxapi/StaticString_8h-source.html +214 -0
  40. data/doc/cxxapi/StringListCreator_8h-source.html +111 -0
  41. data/doc/cxxapi/SystemTime_8h-source.html +191 -78
  42. data/doc/cxxapi/Timer_8h-source.html +157 -0
  43. data/doc/cxxapi/Utils_8h-source.html +621 -434
  44. data/doc/cxxapi/Version_8h-source.html +59 -0
  45. data/doc/cxxapi/annotated.html +1 -1
  46. data/doc/cxxapi/apache2_2Configuration_8h-source.html +79 -0
  47. data/doc/cxxapi/classAgentWatcher-members.html +50 -0
  48. data/doc/cxxapi/classAgentWatcher.html +445 -0
  49. data/doc/cxxapi/classClient-members.html +4 -3
  50. data/doc/cxxapi/classClient.html +50 -46
  51. data/doc/cxxapi/classHooks-members.html +1 -1
  52. data/doc/cxxapi/classHooks.html +1 -1
  53. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager-members.html +37 -0
  54. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager.html +191 -0
  55. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.map +1 -0
  56. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.md5 +1 -0
  57. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.png +0 -0
  58. data/doc/cxxapi/{classPassenger_1_1DummySpawnManager-members.html → classPassenger_1_1ArgumentException-members.html} +3 -2
  59. data/doc/cxxapi/classPassenger_1_1ArgumentException.html +52 -0
  60. data/doc/cxxapi/classPassenger_1_1BacktracesServer-members.html +36 -0
  61. data/doc/cxxapi/classPassenger_1_1BacktracesServer.html +107 -0
  62. data/doc/cxxapi/classPassenger_1_1BacktracesServer__inherit__graph.map +1 -0
  63. data/doc/cxxapi/classPassenger_1_1BacktracesServer__inherit__graph.md5 +1 -0
  64. data/doc/cxxapi/classPassenger_1_1BacktracesServer__inherit__graph.png +0 -0
  65. data/doc/cxxapi/classPassenger_1_1BufferedUpload-members.html +3 -3
  66. data/doc/cxxapi/classPassenger_1_1BufferedUpload.html +18 -34
  67. data/doc/cxxapi/classPassenger_1_1BusyException-members.html +2 -1
  68. data/doc/cxxapi/classPassenger_1_1BusyException.html +3 -2
  69. data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +2 -1
  70. data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +3 -2
  71. data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +1 -1
  72. data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +1 -1
  73. data/doc/cxxapi/{classPassenger_1_1FileChecker-members.html → classPassenger_1_1EOFException-members.html} +3 -4
  74. data/doc/cxxapi/classPassenger_1_1EOFException.html +57 -0
  75. data/doc/cxxapi/classPassenger_1_1EOFException__inherit__graph.map +1 -0
  76. data/doc/cxxapi/classPassenger_1_1EOFException__inherit__graph.md5 +1 -0
  77. data/doc/cxxapi/classPassenger_1_1EOFException__inherit__graph.png +0 -0
  78. data/doc/cxxapi/classPassenger_1_1EventFd-members.html +33 -0
  79. data/doc/cxxapi/classPassenger_1_1EventFd.html +49 -0
  80. data/doc/cxxapi/classPassenger_1_1FileChangeChecker-members.html +37 -0
  81. data/doc/cxxapi/classPassenger_1_1FileChangeChecker.html +166 -0
  82. data/doc/cxxapi/classPassenger_1_1FileDescriptor-members.html +37 -0
  83. data/doc/cxxapi/classPassenger_1_1FileDescriptor.html +159 -0
  84. data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +2 -1
  85. data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +3 -2
  86. data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +2 -1
  87. data/doc/cxxapi/classPassenger_1_1FileSystemException.html +3 -2
  88. data/doc/cxxapi/{classPassenger_1_1ApplicationPoolServer-members.html → classPassenger_1_1HttpStatusExtractor-members.html} +6 -5
  89. data/doc/cxxapi/classPassenger_1_1HttpStatusExtractor.html +128 -0
  90. data/doc/cxxapi/classPassenger_1_1IOException-members.html +2 -1
  91. data/doc/cxxapi/classPassenger_1_1IOException.html +4 -3
  92. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +2 -1
  93. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +1 -1
  94. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
  95. data/doc/cxxapi/classPassenger_1_1MemZeroGuard-members.html +36 -0
  96. data/doc/cxxapi/classPassenger_1_1MemZeroGuard.html +147 -0
  97. data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +12 -5
  98. data/doc/cxxapi/classPassenger_1_1MessageChannel.html +267 -34
  99. data/doc/cxxapi/classPassenger_1_1MessageServer-members.html +46 -0
  100. data/doc/cxxapi/classPassenger_1_1MessageServer.html +438 -0
  101. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext-members.html +33 -0
  102. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext.html +56 -0
  103. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext__inherit__graph.map +1 -0
  104. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext__inherit__graph.md5 +1 -0
  105. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext__inherit__graph.png +0 -0
  106. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext-members.html +38 -0
  107. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext.html +175 -0
  108. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext__inherit__graph.map +1 -0
  109. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext__inherit__graph.md5 +1 -0
  110. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext__inherit__graph.png +0 -0
  111. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler-members.html +36 -0
  112. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler.html +176 -0
  113. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler__inherit__graph.map +1 -0
  114. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler__inherit__graph.md5 +1 -0
  115. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler__inherit__graph.png +0 -0
  116. data/doc/cxxapi/classPassenger_1_1Process-members.html +40 -0
  117. data/doc/cxxapi/classPassenger_1_1Process.html +266 -0
  118. data/doc/cxxapi/classPassenger_1_1RandomGenerator-members.html +33 -0
  119. data/doc/cxxapi/classPassenger_1_1RandomGenerator.html +51 -0
  120. data/doc/cxxapi/classPassenger_1_1RuntimeException-members.html +2 -1
  121. data/doc/cxxapi/classPassenger_1_1RuntimeException.html +3 -2
  122. data/doc/cxxapi/classPassenger_1_1ScgiRequestParser-members.html +47 -0
  123. data/doc/cxxapi/classPassenger_1_1ScgiRequestParser.html +302 -0
  124. data/doc/cxxapi/classPassenger_1_1SecurityException-members.html +33 -0
  125. data/doc/cxxapi/classPassenger_1_1SecurityException.html +52 -0
  126. data/doc/cxxapi/classPassenger_1_1Session-members.html +50 -0
  127. data/doc/cxxapi/classPassenger_1_1Session.html +577 -0
  128. data/doc/cxxapi/classPassenger_1_1Session__inherit__graph.map +1 -0
  129. data/doc/cxxapi/classPassenger_1_1Session__inherit__graph.md5 +1 -0
  130. data/doc/cxxapi/classPassenger_1_1Session__inherit__graph.png +0 -0
  131. data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +2 -1
  132. data/doc/cxxapi/classPassenger_1_1SpawnException.html +5 -4
  133. data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +8 -5
  134. data/doc/cxxapi/classPassenger_1_1SpawnManager.html +127 -45
  135. data/doc/cxxapi/classPassenger_1_1SpawnManager__inherit__graph.map +1 -0
  136. data/doc/cxxapi/classPassenger_1_1SpawnManager__inherit__graph.md5 +1 -0
  137. data/doc/cxxapi/classPassenger_1_1SpawnManager__inherit__graph.png +0 -0
  138. data/doc/cxxapi/classPassenger_1_1StandardSession-members.html +51 -0
  139. data/doc/cxxapi/classPassenger_1_1StandardSession.html +415 -0
  140. data/doc/cxxapi/classPassenger_1_1StandardSession__inherit__graph.map +1 -0
  141. data/doc/cxxapi/classPassenger_1_1StandardSession__inherit__graph.md5 +1 -0
  142. data/doc/cxxapi/classPassenger_1_1StandardSession__inherit__graph.png +0 -0
  143. data/doc/cxxapi/classPassenger_1_1StaticString-members.html +33 -0
  144. data/doc/cxxapi/classPassenger_1_1StaticString.html +54 -0
  145. data/doc/cxxapi/classPassenger_1_1SystemException-members.html +2 -1
  146. data/doc/cxxapi/classPassenger_1_1SystemException.html +4 -3
  147. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +1 -0
  148. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +1 -1
  149. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
  150. data/doc/cxxapi/classPassenger_1_1SystemTime-members.html +9 -1
  151. data/doc/cxxapi/classPassenger_1_1SystemTime.html +92 -8
  152. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException-members.html +37 -0
  153. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException.html +57 -0
  154. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.map +1 -0
  155. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.md5 +1 -0
  156. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.png +0 -0
  157. data/doc/cxxapi/classPassenger_1_1TimeoutException-members.html +33 -0
  158. data/doc/cxxapi/classPassenger_1_1TimeoutException.html +50 -0
  159. data/doc/cxxapi/{classPassenger_1_1Application-members.html → classPassenger_1_1Timer-members.html} +8 -7
  160. data/doc/cxxapi/classPassenger_1_1Timer.html +163 -0
  161. data/doc/cxxapi/classServer-members.html +33 -0
  162. data/doc/cxxapi/classServer.html +46 -0
  163. data/doc/cxxapi/classServerInstanceDirToucher-members.html +33 -0
  164. data/doc/cxxapi/classServerInstanceDirToucher.html +43 -0
  165. data/doc/cxxapi/classes.html +1 -1
  166. data/doc/cxxapi/definitions_8h-source.html +1 -1
  167. data/doc/cxxapi/files.html +1 -1
  168. data/doc/cxxapi/functions.html +1 -1
  169. data/doc/cxxapi/{functions_type.html → functions_enum.html} +7 -5
  170. data/doc/cxxapi/functions_eval.html +55 -0
  171. data/doc/cxxapi/functions_func.html +1 -1
  172. data/doc/cxxapi/functions_vars.html +106 -9
  173. data/doc/cxxapi/graph_legend.html +1 -1
  174. data/doc/cxxapi/group__Configuration.html +1 -1
  175. data/doc/cxxapi/group__Core.html +1 -1
  176. data/doc/cxxapi/group__Exceptions.html +17 -1
  177. data/doc/cxxapi/group__Hooks.html +1 -1
  178. data/doc/cxxapi/group__Support.html +1 -1
  179. data/doc/cxxapi/hierarchy.html +34 -12
  180. data/doc/cxxapi/inherit__graph__0.map +1 -1
  181. data/doc/cxxapi/inherit__graph__0.md5 +1 -1
  182. data/doc/cxxapi/inherit__graph__0.png +0 -0
  183. data/doc/cxxapi/inherit__graph__1.map +1 -1
  184. data/doc/cxxapi/inherit__graph__1.md5 +1 -1
  185. data/doc/cxxapi/inherit__graph__1.png +0 -0
  186. data/doc/cxxapi/inherit__graph__10.map +1 -1
  187. data/doc/cxxapi/inherit__graph__10.md5 +1 -1
  188. data/doc/cxxapi/inherit__graph__10.png +0 -0
  189. data/doc/cxxapi/inherit__graph__11.map +1 -1
  190. data/doc/cxxapi/inherit__graph__11.md5 +1 -1
  191. data/doc/cxxapi/inherit__graph__11.png +0 -0
  192. data/doc/cxxapi/inherit__graph__12.map +1 -1
  193. data/doc/cxxapi/inherit__graph__12.md5 +1 -1
  194. data/doc/cxxapi/inherit__graph__12.png +0 -0
  195. data/doc/cxxapi/inherit__graph__13.map +1 -1
  196. data/doc/cxxapi/inherit__graph__13.md5 +1 -1
  197. data/doc/cxxapi/inherit__graph__13.png +0 -0
  198. data/doc/cxxapi/inherit__graph__14.map +3 -2
  199. data/doc/cxxapi/inherit__graph__14.md5 +1 -1
  200. data/doc/cxxapi/inherit__graph__14.png +0 -0
  201. data/doc/cxxapi/inherit__graph__15.map +1 -1
  202. data/doc/cxxapi/inherit__graph__15.md5 +1 -1
  203. data/doc/cxxapi/inherit__graph__15.png +0 -0
  204. data/doc/cxxapi/inherit__graph__16.map +1 -1
  205. data/doc/cxxapi/inherit__graph__16.md5 +1 -1
  206. data/doc/cxxapi/inherit__graph__16.png +0 -0
  207. data/doc/cxxapi/inherit__graph__17.map +1 -1
  208. data/doc/cxxapi/inherit__graph__17.md5 +1 -1
  209. data/doc/cxxapi/inherit__graph__17.png +0 -0
  210. data/doc/cxxapi/inherit__graph__18.map +2 -1
  211. data/doc/cxxapi/inherit__graph__18.md5 +1 -1
  212. data/doc/cxxapi/inherit__graph__18.png +0 -0
  213. data/doc/cxxapi/inherit__graph__19.map +1 -1
  214. data/doc/cxxapi/inherit__graph__19.md5 +1 -1
  215. data/doc/cxxapi/inherit__graph__19.png +0 -0
  216. data/doc/cxxapi/inherit__graph__2.map +1 -1
  217. data/doc/cxxapi/inherit__graph__2.md5 +1 -1
  218. data/doc/cxxapi/inherit__graph__2.png +0 -0
  219. data/doc/cxxapi/inherit__graph__20.map +1 -2
  220. data/doc/cxxapi/inherit__graph__20.md5 +1 -1
  221. data/doc/cxxapi/inherit__graph__20.png +0 -0
  222. data/doc/cxxapi/inherit__graph__21.map +1 -1
  223. data/doc/cxxapi/inherit__graph__21.md5 +1 -1
  224. data/doc/cxxapi/inherit__graph__21.png +0 -0
  225. data/doc/cxxapi/inherit__graph__22.map +1 -0
  226. data/doc/cxxapi/inherit__graph__22.md5 +1 -0
  227. data/doc/cxxapi/inherit__graph__22.png +0 -0
  228. data/doc/cxxapi/inherit__graph__23.map +1 -0
  229. data/doc/cxxapi/inherit__graph__23.md5 +1 -0
  230. data/doc/cxxapi/inherit__graph__23.png +0 -0
  231. data/doc/cxxapi/inherit__graph__24.map +1 -0
  232. data/doc/cxxapi/inherit__graph__24.md5 +1 -0
  233. data/doc/cxxapi/inherit__graph__24.png +0 -0
  234. data/doc/cxxapi/inherit__graph__25.map +1 -0
  235. data/doc/cxxapi/inherit__graph__25.md5 +1 -0
  236. data/doc/cxxapi/inherit__graph__25.png +0 -0
  237. data/doc/cxxapi/inherit__graph__26.map +1 -0
  238. data/doc/cxxapi/inherit__graph__26.md5 +1 -0
  239. data/doc/cxxapi/inherit__graph__26.png +0 -0
  240. data/doc/cxxapi/inherit__graph__27.map +2 -0
  241. data/doc/cxxapi/inherit__graph__27.md5 +1 -0
  242. data/doc/cxxapi/inherit__graph__27.png +0 -0
  243. data/doc/cxxapi/inherit__graph__28.map +1 -0
  244. data/doc/cxxapi/inherit__graph__28.md5 +1 -0
  245. data/doc/cxxapi/inherit__graph__28.png +0 -0
  246. data/doc/cxxapi/inherit__graph__29.map +1 -0
  247. data/doc/cxxapi/inherit__graph__29.md5 +1 -0
  248. data/doc/cxxapi/inherit__graph__29.png +0 -0
  249. data/doc/cxxapi/inherit__graph__3.map +2 -1
  250. data/doc/cxxapi/inherit__graph__3.md5 +1 -1
  251. data/doc/cxxapi/inherit__graph__3.png +0 -0
  252. data/doc/cxxapi/inherit__graph__30.map +1 -0
  253. data/doc/cxxapi/inherit__graph__30.md5 +1 -0
  254. data/doc/cxxapi/inherit__graph__30.png +0 -0
  255. data/doc/cxxapi/inherit__graph__31.map +3 -0
  256. data/doc/cxxapi/inherit__graph__31.md5 +1 -0
  257. data/doc/cxxapi/inherit__graph__31.png +0 -0
  258. data/doc/cxxapi/inherit__graph__32.map +1 -0
  259. data/doc/cxxapi/inherit__graph__32.md5 +1 -0
  260. data/doc/cxxapi/inherit__graph__32.png +0 -0
  261. data/doc/cxxapi/inherit__graph__33.map +1 -0
  262. data/doc/cxxapi/inherit__graph__33.md5 +1 -0
  263. data/doc/cxxapi/inherit__graph__33.png +0 -0
  264. data/doc/cxxapi/inherit__graph__34.map +1 -0
  265. data/doc/cxxapi/inherit__graph__34.md5 +1 -0
  266. data/doc/cxxapi/inherit__graph__34.png +0 -0
  267. data/doc/cxxapi/inherit__graph__35.map +1 -0
  268. data/doc/cxxapi/inherit__graph__35.md5 +1 -0
  269. data/doc/cxxapi/inherit__graph__35.png +0 -0
  270. data/doc/cxxapi/inherit__graph__36.map +1 -0
  271. data/doc/cxxapi/inherit__graph__36.md5 +1 -0
  272. data/doc/cxxapi/inherit__graph__36.png +0 -0
  273. data/doc/cxxapi/inherit__graph__4.map +1 -1
  274. data/doc/cxxapi/inherit__graph__4.md5 +1 -1
  275. data/doc/cxxapi/inherit__graph__4.png +0 -0
  276. data/doc/cxxapi/inherit__graph__5.map +1 -1
  277. data/doc/cxxapi/inherit__graph__5.md5 +1 -1
  278. data/doc/cxxapi/inherit__graph__5.png +0 -0
  279. data/doc/cxxapi/inherit__graph__6.map +1 -2
  280. data/doc/cxxapi/inherit__graph__6.md5 +1 -1
  281. data/doc/cxxapi/inherit__graph__6.png +0 -0
  282. data/doc/cxxapi/inherit__graph__7.map +1 -1
  283. data/doc/cxxapi/inherit__graph__7.md5 +1 -1
  284. data/doc/cxxapi/inherit__graph__7.png +0 -0
  285. data/doc/cxxapi/inherit__graph__8.map +1 -1
  286. data/doc/cxxapi/inherit__graph__8.md5 +1 -1
  287. data/doc/cxxapi/inherit__graph__8.png +0 -0
  288. data/doc/cxxapi/inherit__graph__9.map +1 -1
  289. data/doc/cxxapi/inherit__graph__9.md5 +1 -1
  290. data/doc/cxxapi/inherit__graph__9.png +0 -0
  291. data/doc/cxxapi/inherits.html +81 -41
  292. data/doc/cxxapi/main.html +1 -1
  293. data/doc/cxxapi/md5_8h-source.html +121 -0
  294. data/doc/cxxapi/modules.html +1 -1
  295. data/doc/cxxapi/namespacePassenger.html +651 -0
  296. data/doc/cxxapi/namespacemembers.html +155 -0
  297. data/doc/cxxapi/namespacemembers_enum.html +46 -0
  298. data/doc/cxxapi/namespacemembers_eval.html +52 -0
  299. data/doc/cxxapi/namespacemembers_func.html +139 -0
  300. data/doc/cxxapi/namespacemembers_type.html +50 -0
  301. data/doc/cxxapi/namespaces.html +34 -0
  302. data/doc/cxxapi/nginx_2Configuration_8h-source.html +114 -0
  303. data/doc/cxxapi/ngx__http__passenger__module_8h-source.html +91 -0
  304. data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +2 -1
  305. data/doc/cxxapi/structPassenger_1_1AnythingToString.html +3 -2
  306. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +2 -1
  307. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +3 -2
  308. data/doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard-members.html +33 -0
  309. data/doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard.html +49 -0
  310. data/doc/cxxapi/structPassenger_1_1PoolOptions-members.html +19 -7
  311. data/doc/cxxapi/structPassenger_1_1PoolOptions.html +323 -53
  312. data/doc/cxxapi/structPassenger_1_1StaticString_1_1Hash-members.html +33 -0
  313. data/doc/cxxapi/structPassenger_1_1StaticString_1_1Hash.html +49 -0
  314. data/ext/common/MessageChannel.h +48 -4
  315. data/ext/common/Version.h +1 -1
  316. data/ext/nginx/HttpStatusExtractor.h +1 -0
  317. data/ext/nginx/ScgiRequestParser.h +1 -0
  318. data/ext/phusion_passenger/native_support.c +5 -1
  319. data/lib/phusion_passenger/constants.rb +1 -1
  320. data/lib/phusion_passenger/message_channel.rb +45 -3
  321. data/lib/phusion_passenger/rack/application_spawner.rb +4 -0
  322. data/lib/phusion_passenger/railz/application_spawner.rb +19 -1
  323. data/lib/phusion_passenger/utils.rb +3 -3
  324. data/lib/phusion_passenger/utils/rewindable_input.rb +5 -0
  325. data/test/MessageChannelTest.cpp +9 -1
  326. data/test/stub/message_channel.rb +1 -1
  327. data/test/stub/message_channel_2.rb +1 -1
  328. data/test/stub/message_channel_3.rb +2 -2
  329. metadata +173 -113
  330. data/doc/cxxapi/ApplicationPoolServer_8h-source.html +0 -833
  331. data/doc/cxxapi/ApplicationPool_8h-source.html +0 -226
  332. data/doc/cxxapi/Application_8h-source.html +0 -553
  333. data/doc/cxxapi/DummySpawnManager_8h-source.html +0 -130
  334. data/doc/cxxapi/FileChecker_8h-source.html +0 -134
  335. data/doc/cxxapi/StandardApplicationPool_8h-source.html +0 -842
  336. data/doc/cxxapi/classPassenger_1_1Application.html +0 -231
  337. data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +0 -41
  338. data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +0 -323
  339. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +0 -227
  340. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.map +0 -1
  341. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.md5 +0 -1
  342. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.png +0 -0
  343. data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +0 -44
  344. data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +0 -403
  345. data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +0 -53
  346. data/doc/cxxapi/classPassenger_1_1FileChecker.html +0 -124
  347. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +0 -44
  348. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +0 -342
  349. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.map +0 -1
  350. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.md5 +0 -1
  351. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.png +0 -0
  352. data/doc/rdoc/classes/ConditionVariable.html +0 -194
  353. data/doc/rdoc/classes/Exception.html +0 -120
  354. data/doc/rdoc/classes/GC.html +0 -113
  355. data/doc/rdoc/classes/IO.html +0 -169
  356. data/doc/rdoc/classes/PhusionPassenger.html +0 -239
  357. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +0 -153
  358. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +0 -517
  359. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +0 -719
  360. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +0 -97
  361. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +0 -96
  362. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +0 -97
  363. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +0 -96
  364. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +0 -598
  365. data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +0 -140
  366. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +0 -317
  367. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess/Instance.html +0 -138
  368. data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +0 -154
  369. data/doc/rdoc/classes/PhusionPassenger/Application.html +0 -283
  370. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +0 -172
  371. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +0 -145
  372. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +0 -175
  373. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +0 -141
  374. data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +0 -92
  375. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +0 -489
  376. data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +0 -350
  377. data/doc/rdoc/classes/PhusionPassenger/Rack.html +0 -91
  378. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +0 -188
  379. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +0 -199
  380. data/doc/rdoc/classes/PhusionPassenger/Railz.html +0 -95
  381. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +0 -438
  382. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner/Error.html +0 -98
  383. data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +0 -200
  384. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +0 -436
  385. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner/Error.html +0 -98
  386. data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +0 -155
  387. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +0 -402
  388. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +0 -125
  389. data/doc/rdoc/classes/PhusionPassenger/Utils.html +0 -805
  390. data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +0 -169
  391. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput.html +0 -247
  392. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput/Tempfile.html +0 -120
  393. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +0 -140
  394. data/doc/rdoc/classes/PhusionPassenger/WSGI.html +0 -89
  395. data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +0 -188
  396. data/doc/rdoc/classes/PlatformInfo.html +0 -866
  397. data/doc/rdoc/classes/RakeExtensions.html +0 -197
  398. data/doc/rdoc/classes/Signal.html +0 -139
  399. data/doc/rdoc/created.rid +0 -1
  400. data/doc/rdoc/files/DEVELOPERS_TXT.html +0 -255
  401. data/doc/rdoc/files/README.html +0 -157
  402. data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +0 -92
  403. data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +0 -129
  404. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +0 -129
  405. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +0 -126
  406. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +0 -128
  407. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +0 -130
  408. data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +0 -122
  409. data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +0 -127
  410. data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +0 -126
  411. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +0 -122
  412. data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +0 -134
  413. data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +0 -122
  414. data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +0 -122
  415. data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +0 -126
  416. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +0 -120
  417. data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +0 -122
  418. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +0 -127
  419. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +0 -133
  420. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +0 -125
  421. data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +0 -140
  422. data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +0 -126
  423. data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +0 -145
  424. data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +0 -125
  425. data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +0 -122
  426. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +0 -159
  427. data/doc/rdoc/files/lib/phusion_passenger/utils/rewindable_input_rb.html +0 -100
  428. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +0 -174
  429. data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +0 -129
  430. data/doc/rdoc/files/misc/rake/extensions_rb.html +0 -130
  431. data/doc/rdoc/fr_class_index.html +0 -93
  432. data/doc/rdoc/fr_file_index.html +0 -77
  433. data/doc/rdoc/fr_method_index.html +0 -212
  434. data/doc/rdoc/index.html +0 -26
  435. data/doc/rdoc/rdoc-style.css +0 -187
@@ -1,199 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
- <html>
6
- <head>
7
- <title>Class: PhusionPassenger::Rack::RequestHandler</title>
8
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
10
-
11
- <script language="JavaScript" type="text/javascript">
12
- // <![CDATA[
13
-
14
- function toggleSource( id )
15
- {
16
- var elem
17
- var link
18
-
19
- if( document.getElementById )
20
- {
21
- elem = document.getElementById( id )
22
- link = document.getElementById( "l_" + id )
23
- }
24
- else if ( document.all )
25
- {
26
- elem = eval( "document.all." + id )
27
- link = eval( "document.all.l_" + id )
28
- }
29
- else
30
- return false;
31
-
32
- if( elem.style.display == "block" )
33
- {
34
- elem.style.display = "none"
35
- link.innerHTML = "show source"
36
- }
37
- else
38
- {
39
- elem.style.display = "block"
40
- link.innerHTML = "hide source"
41
- }
42
- }
43
-
44
- function openCode( url )
45
- {
46
- window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
47
- }
48
- // ]]>
49
- </script>
50
- </head>
51
-
52
- <body>
53
- <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
- <td class="file-title"><span class="file-title-prefix">Class</span><br />PhusionPassenger::Rack::RequestHandler</td>
55
- <td align="right">
56
- <table cellspacing="0" cellpadding="2">
57
- <tr valign="top">
58
- <td>In:</td>
59
- <td>
60
- <a href="../../../files/lib/phusion_passenger/rack/request_handler_rb.html">lib/phusion_passenger/rack/request_handler.rb</a>
61
- </td>
62
- </tr>
63
- <tr>
64
- <td>Parent:</td>
65
- <td>
66
- AbstractRequestHandler
67
- </td>
68
- </tr>
69
- </table>
70
- </td>
71
- </tr>
72
- </table>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
- <div id="content">
77
-
78
- <div class="description"><p>
79
- A request handler for <a href="../Rack.html">Rack</a> applications.
80
- </p>
81
- </div>
82
-
83
-
84
-
85
- <div class="sectiontitle">Methods</div>
86
- <ul>
87
- <li><a href="#M000042">new</a></li>
88
- <li><a href="#M000043">process_request</a></li>
89
- </ul>
90
-
91
-
92
-
93
-
94
-
95
-
96
- <div class="sectiontitle">Public Class methods</div>
97
- <div class="method">
98
- <div class="title">
99
- <a name="M000042"></a><b>new</b>(owner_pipe, app, options = {})
100
- </div>
101
- <div class="description">
102
- <p>
103
- <tt>app</tt> is the <a href="../Rack.html">Rack</a> application object.
104
- </p>
105
- </div>
106
- <div class="sourcecode">
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
- <pre>
110
- <span class="ruby-comment cmt"># File lib/phusion_passenger/rack/request_handler.rb, line 56</span>
111
- 56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">owner_pipe</span>, <span class="ruby-identifier">app</span>, <span class="ruby-identifier">options</span> = {})
112
- 57: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">owner_pipe</span>, <span class="ruby-identifier">options</span>)
113
- 58: <span class="ruby-ivar">@app</span> = <span class="ruby-identifier">app</span>
114
- 59: <span class="ruby-keyword kw">end</span>
115
- </pre>
116
- </div>
117
- </div>
118
- </div>
119
- <div class="sectiontitle">Protected Instance methods</div>
120
- <div class="method">
121
- <div class="title">
122
- <a name="M000043"></a><b>process_request</b>(env, input, output)
123
- </div>
124
- <div class="description">
125
- <p>
126
- Overrided method.
127
- </p>
128
- </div>
129
- <div class="sourcecode">
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
- <pre>
133
- <span class="ruby-comment cmt"># File lib/phusion_passenger/rack/request_handler.rb, line 63</span>
134
- 63: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_request</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">input</span>, <span class="ruby-identifier">output</span>)
135
- 64: <span class="ruby-identifier">rewindable_input</span> = <span class="ruby-constant">Utils</span><span class="ruby-operator">::</span><span class="ruby-constant">RewindableInput</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">input</span>)
136
- 65: <span class="ruby-keyword kw">begin</span>
137
- 66: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_VERSION</span>] = <span class="ruby-constant">RACK_VERSION_VALUE</span>
138
- 67: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_INPUT</span>] = <span class="ruby-identifier">rewindable_input</span>
139
- 68: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_ERRORS</span>] = <span class="ruby-constant">STDERR</span>
140
- 69: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_MULTITHREAD</span>] = <span class="ruby-keyword kw">false</span>
141
- 70: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_MULTIPROCESS</span>] = <span class="ruby-keyword kw">true</span>
142
- 71: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_RUN_ONCE</span>] = <span class="ruby-keyword kw">false</span>
143
- 72:
144
- 73: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_LENGTH</span>]
145
- 74: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>)
146
- 75: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_LENGTH</span>]
147
- 76: <span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_LENGTH</span>] = <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>]
148
- 77: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">HTTP_CONTENT_LENGTH</span>)
149
- 78: <span class="ruby-keyword kw">end</span>
150
- 79: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_TYPE</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_TYPE</span>]
151
- 80: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">HTTP_CONTENT_TYPE</span>)
152
- 81: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_TYPE</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_TYPE</span>]
153
- 82: <span class="ruby-identifier">env</span>[<span class="ruby-constant">CONTENT_TYPE</span>] = <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTP_CONTENT_TYPE</span>]
154
- 83: <span class="ruby-identifier">env</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">HTTP_CONTENT_TYPE</span>)
155
- 84: <span class="ruby-keyword kw">end</span>
156
- 85:
157
- 86: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTPS</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">YES</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTPS</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">ON</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">env</span>[<span class="ruby-constant">HTTPS</span>] <span class="ruby-operator">==</span> <span class="ruby-constant">ONE</span>
158
- 87: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_URL_SCHEME</span>] = <span class="ruby-constant">HTTPS_DOWNCASE</span>
159
- 88: <span class="ruby-keyword kw">else</span>
160
- 89: <span class="ruby-identifier">env</span>[<span class="ruby-constant">RACK_URL_SCHEME</span>] = <span class="ruby-constant">HTTP</span>
161
- 90: <span class="ruby-keyword kw">end</span>
162
- 91:
163
- 92: <span class="ruby-identifier">status</span>, <span class="ruby-identifier">headers</span>, <span class="ruby-identifier">body</span> = <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">env</span>)
164
- 93: <span class="ruby-keyword kw">begin</span>
165
- 94: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">&quot;Status: #{status.to_i}#{CRLF}&quot;</span>)
166
- 95: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">&quot;X-Powered-By: #{PASSENGER_HEADER}#{CRLF}&quot;</span>)
167
- 96: <span class="ruby-identifier">headers</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">values</span><span class="ruby-operator">|</span>
168
- 97: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">values</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
169
- 98: <span class="ruby-identifier">values</span> = <span class="ruby-identifier">values</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
170
- 99: <span class="ruby-keyword kw">end</span>
171
- 100: <span class="ruby-identifier">values</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
172
- 101: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-node">&quot;#{key}: #{value}#{CRLF}&quot;</span>)
173
- 102: <span class="ruby-keyword kw">end</span>
174
- 103: <span class="ruby-keyword kw">end</span>
175
- 104: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">CRLF</span>)
176
- 105: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">body</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
177
- 106: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">body</span>)
178
- 107: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">body</span>
179
- 108: <span class="ruby-identifier">body</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
180
- 109: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">s</span>)
181
- 110: <span class="ruby-keyword kw">end</span>
182
- 111: <span class="ruby-keyword kw">end</span>
183
- 112: <span class="ruby-keyword kw">ensure</span>
184
- 113: <span class="ruby-identifier">body</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">body</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:close</span>)
185
- 114: <span class="ruby-keyword kw">end</span>
186
- 115: <span class="ruby-keyword kw">ensure</span>
187
- 116: <span class="ruby-identifier">rewindable_input</span>.<span class="ruby-identifier">close</span>
188
- 117: <span class="ruby-keyword kw">end</span>
189
- 118: <span class="ruby-keyword kw">end</span>
190
- </pre>
191
- </div>
192
- </div>
193
- </div>
194
- </div>
195
-
196
- </div>
197
-
198
- </body>
199
- </html>
@@ -1,95 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
- <html>
6
- <head>
7
- <title>Module: PhusionPassenger::Railz</title>
8
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
10
-
11
- <script language="JavaScript" type="text/javascript">
12
- // <![CDATA[
13
-
14
- function toggleSource( id )
15
- {
16
- var elem
17
- var link
18
-
19
- if( document.getElementById )
20
- {
21
- elem = document.getElementById( id )
22
- link = document.getElementById( "l_" + id )
23
- }
24
- else if ( document.all )
25
- {
26
- elem = eval( "document.all." + id )
27
- link = eval( "document.all.l_" + id )
28
- }
29
- else
30
- return false;
31
-
32
- if( elem.style.display == "block" )
33
- {
34
- elem.style.display = "none"
35
- link.innerHTML = "show source"
36
- }
37
- else
38
- {
39
- elem.style.display = "block"
40
- link.innerHTML = "hide source"
41
- }
42
- }
43
-
44
- function openCode( url )
45
- {
46
- window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
47
- }
48
- // ]]>
49
- </script>
50
- </head>
51
-
52
- <body>
53
- <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
- <td class="file-title"><span class="file-title-prefix">Module</span><br />PhusionPassenger::Railz</td>
55
- <td align="right">
56
- <table cellspacing="0" cellpadding="2">
57
- <tr valign="top">
58
- <td>In:</td>
59
- <td>
60
- <a href="../../files/lib/phusion_passenger/railz/application_spawner_rb.html">lib/phusion_passenger/railz/application_spawner.rb</a>
61
- <a href="../../files/lib/phusion_passenger/railz/cgi_fixed_rb.html">lib/phusion_passenger/railz/cgi_fixed.rb</a>
62
- <a href="../../files/lib/phusion_passenger/railz/framework_spawner_rb.html">lib/phusion_passenger/railz/framework_spawner.rb</a>
63
- <a href="../../files/lib/phusion_passenger/railz/request_handler_rb.html">lib/phusion_passenger/railz/request_handler.rb</a>
64
- </td>
65
- </tr>
66
- </table>
67
- </td>
68
- </tr>
69
- </table>
70
- <!-- banner header -->
71
-
72
- <div id="bodyContent">
73
- <div id="content">
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
- <div class="sectiontitle">Classes and Modules</div>
82
- Class <a href="Railz/ApplicationSpawner.html" class="link">PhusionPassenger::Railz::ApplicationSpawner</a><br />
83
- Class <a href="Railz/CGIFixed.html" class="link">PhusionPassenger::Railz::CGIFixed</a><br />
84
- Class <a href="Railz/FrameworkSpawner.html" class="link">PhusionPassenger::Railz::FrameworkSpawner</a><br />
85
- Class <a href="Railz/RequestHandler.html" class="link">PhusionPassenger::Railz::RequestHandler</a><br />
86
-
87
-
88
-
89
-
90
- </div>
91
-
92
- </div>
93
-
94
- </body>
95
- </html>
@@ -1,438 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
- <html>
6
- <head>
7
- <title>Class: PhusionPassenger::Railz::ApplicationSpawner</title>
8
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
10
-
11
- <script language="JavaScript" type="text/javascript">
12
- // <![CDATA[
13
-
14
- function toggleSource( id )
15
- {
16
- var elem
17
- var link
18
-
19
- if( document.getElementById )
20
- {
21
- elem = document.getElementById( id )
22
- link = document.getElementById( "l_" + id )
23
- }
24
- else if ( document.all )
25
- {
26
- elem = eval( "document.all." + id )
27
- link = eval( "document.all.l_" + id )
28
- }
29
- else
30
- return false;
31
-
32
- if( elem.style.display == "block" )
33
- {
34
- elem.style.display = "none"
35
- link.innerHTML = "show source"
36
- }
37
- else
38
- {
39
- elem.style.display = "block"
40
- link.innerHTML = "hide source"
41
- }
42
- }
43
-
44
- function openCode( url )
45
- {
46
- window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
47
- }
48
- // ]]>
49
- </script>
50
- </head>
51
-
52
- <body>
53
- <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
- <td class="file-title"><span class="file-title-prefix">Class</span><br />PhusionPassenger::Railz::ApplicationSpawner</td>
55
- <td align="right">
56
- <table cellspacing="0" cellpadding="2">
57
- <tr valign="top">
58
- <td>In:</td>
59
- <td>
60
- <a href="../../../files/lib/phusion_passenger/railz/application_spawner_rb.html">lib/phusion_passenger/railz/application_spawner.rb</a>
61
- </td>
62
- </tr>
63
- <tr>
64
- <td>Parent:</td>
65
- <td>
66
- AbstractServer
67
- </td>
68
- </tr>
69
- </table>
70
- </td>
71
- </tr>
72
- </table>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
- <div id="content">
77
-
78
- <div class="description"><p>
79
- This class is capable of spawning instances of a single Ruby on Rails
80
- application. It does so by preloading as much of the application&#8216;s
81
- code as possible, then creating instances of the application using what is
82
- already preloaded. This makes it spawning application instances very fast,
83
- except for the first spawn.
84
- </p>
85
- <p>
86
- Use multiple instances of <a
87
- href="ApplicationSpawner.html">ApplicationSpawner</a> if you need to spawn
88
- multiple different Ruby on Rails applications.
89
- </p>
90
- <p>
91
- <b>Note</b>: <a href="ApplicationSpawner.html">ApplicationSpawner</a> may
92
- only be started asynchronously with <a
93
- href="../AbstractServer.html#M000127">AbstractServer#start</a>. Starting it
94
- synchronously with <a
95
- href="../AbstractServer.html#M000128">AbstractServer#start_synchronously</a>
96
- has not been tested.
97
- </p>
98
- </div>
99
-
100
-
101
-
102
- <div class="sectiontitle">Methods</div>
103
- <ul>
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
- </ul>
109
-
110
- <div class="sectiontitle">Included Modules</div>
111
- <ul>
112
- <li><a href="../Utils.html">Utils</a></li>
113
- </ul>
114
-
115
-
116
- <div class="sectiontitle">Classes and Modules</div>
117
- Class <a href="ApplicationSpawner/Error.html" class="link">PhusionPassenger::Railz::ApplicationSpawner::Error</a><br />
118
-
119
-
120
- <div class="sectiontitle">Constants</div>
121
- <table border='0' cellpadding='5'>
122
- <tr valign='top'>
123
- <td class="attr-name">ROOT_UID</td>
124
- <td>=</td>
125
- <td class="attr-value">0</td>
126
- </tr>
127
- <tr valign='top'>
128
- <td>&nbsp;</td>
129
- <td colspan="2" class="attr-desc">
130
- The user ID of the root user.
131
-
132
- </td>
133
- </tr>
134
- <tr valign='top'>
135
- <td class="attr-name">ROOT_GID</td>
136
- <td>=</td>
137
- <td class="attr-value">0</td>
138
- </tr>
139
- <tr valign='top'>
140
- <td>&nbsp;</td>
141
- <td colspan="2" class="attr-desc">
142
- The group ID of the root user.
143
-
144
- </td>
145
- </tr>
146
- </table>
147
-
148
- <div class="sectiontitle">Attributes</div>
149
- <table border='0' cellpadding='5'>
150
- <tr valign='top'>
151
- <td class='attr-rw'>
152
- [R]
153
- </td>
154
- <td class='attr-name'>app_root</td>
155
- <td class='attr-desc'>
156
- The application root of this spawner.
157
-
158
- </td>
159
- </tr>
160
- </table>
161
-
162
- <div class="sectiontitle">Public Class methods</div>
163
- <div class="method">
164
- <div class="title">
165
- <a name="M000069"></a><b>new</b>(app_root, options = {})
166
- </div>
167
- <div class="description">
168
- <p>
169
- <tt>app_root</tt> is the root directory of this application, i.e. the
170
- directory that contains &#8216;app/&#8217;, &#8216;public/&#8217;, etc. If
171
- given an invalid directory, or a directory that doesn&#8216;t appear to be
172
- a Rails application root directory, then an <a
173
- href="../InvalidPath.html">InvalidPath</a> will be raised.
174
- </p>
175
- <p>
176
- Additional options are:
177
- </p>
178
- <ul>
179
- <li><tt>lower_privilege</tt> and <tt>lowest_user</tt>: If
180
- <tt>lower_privilege</tt> is true, then <a
181
- href="ApplicationSpawner.html">ApplicationSpawner</a> will attempt to
182
- switch to the user who owns the application&#8216;s
183
- <tt>config/environment.rb</tt>, and to the default group of that user.
184
-
185
- <p>
186
- If that user doesn&#8216;t exist on the system, or if that user is root,
187
- then <a href="ApplicationSpawner.html">ApplicationSpawner</a> will attempt
188
- to switch to the username given by <tt>lowest_user</tt> (and to the default
189
- group of that user). If <tt>lowest_user</tt> doesn&#8216;t exist either, or
190
- if switching user failed (because the current process does not have the
191
- privilege to do so), then <a
192
- href="ApplicationSpawner.html">ApplicationSpawner</a> will continue without
193
- reporting an error.
194
- </p>
195
- </li>
196
- <li><tt>environment</tt>: Allows one to specify the RAILS_ENV environment to
197
- use.
198
-
199
- </li>
200
- <li><tt>environment_variables</tt>: Environment variables which should be
201
- passed to the spawned application. This is NULL-seperated string of
202
- key-value pairs, encoded in base64. The last byte in the unencoded data
203
- must be a NULL.
204
-
205
- </li>
206
- <li><tt>base_uri</tt>: The base URI on which this application is deployed. It
207
- equals &quot;/&quot; string if the application is deployed on the root URI.
208
- It must not equal the empty string.
209
-
210
- </li>
211
- <li><tt>print_exceptions</tt>: Whether exceptions that have occurred during
212
- application initialization should be printed to STDERR. The default is
213
- true.
214
-
215
- </li>
216
- </ul>
217
- <p>
218
- All other options will be passed on to <a
219
- href="RequestHandler.html">RequestHandler</a>.
220
- </p>
221
- </div>
222
- <div class="sourcecode">
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
- <pre>
226
- <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line 102</span>
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> = {})
228
- 103: <span class="ruby-keyword kw">super</span>()
229
- 104: <span class="ruby-ivar">@app_root</span> = <span class="ruby-identifier">app_root</span>
230
- 105: <span class="ruby-ivar">@canonicalized_app_root</span> = <span class="ruby-identifier">canonicalize_path</span>(<span class="ruby-identifier">app_root</span>)
231
- 106: <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">sanitize_spawn_options</span>(<span class="ruby-identifier">options</span>)
232
- 107: <span class="ruby-ivar">@lower_privilege</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value str">&quot;lower_privilege&quot;</span>]
233
- 108: <span class="ruby-ivar">@lowest_user</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value str">&quot;lowest_user&quot;</span>]
234
- 109: <span class="ruby-ivar">@environment</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value str">&quot;environment&quot;</span>]
235
- 110: <span class="ruby-ivar">@encoded_environment_variables</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value str">&quot;environment_variables&quot;</span>]
236
- 111: <span class="ruby-ivar">@base_uri</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value str">&quot;base_uri&quot;</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@options</span>[<span class="ruby-value str">&quot;base_uri&quot;</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@options</span>[<span class="ruby-value str">&quot;base_uri&quot;</span>] <span class="ruby-operator">!=</span> <span class="ruby-value str">&quot;/&quot;</span>
237
- 112: <span class="ruby-ivar">@print_exceptions</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value str">&quot;print_exceptions&quot;</span>]
238
- 113: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">max_idle_time</span> = <span class="ruby-constant">DEFAULT_APP_SPAWNER_MAX_IDLE_TIME</span>
239
- 114: <span class="ruby-identifier">assert_valid_app_root</span>(<span class="ruby-ivar">@app_root</span>)
240
- 115: <span class="ruby-identifier">define_message_handler</span>(<span class="ruby-identifier">:spawn_application</span>, <span class="ruby-identifier">:handle_spawn_application</span>)
241
- 116: <span class="ruby-keyword kw">end</span>
242
- </pre>
243
- </div>
244
- </div>
245
- </div>
246
- <div class="sectiontitle">Public Instance methods</div>
247
- <div class="method">
248
- <div class="title">
249
- <a name="M000070"></a><b>spawn_application</b>()
250
- </div>
251
- <div class="description">
252
- <p>
253
- Spawn an instance of the RoR application. When successful, an <a
254
- href="../Application.html">Application</a> object will be returned, which
255
- represents the spawned RoR application.
256
- </p>
257
- <p>
258
- Raises:
259
- </p>
260
- <ul>
261
- <li><a
262
- href="../AbstractServer/ServerNotStarted.html">AbstractServer::ServerNotStarted</a>:
263
- The <a href="ApplicationSpawner.html">ApplicationSpawner</a> server
264
- hasn&#8216;t already been started.
265
-
266
- </li>
267
- <li><a href="ApplicationSpawner/Error.html">ApplicationSpawner::Error</a>: The
268
- <a href="ApplicationSpawner.html">ApplicationSpawner</a> server exited
269
- unexpectedly.
270
-
271
- </li>
272
- </ul>
273
- </div>
274
- <div class="sourcecode">
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
- <pre>
278
- <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line 124</span>
279
- 124: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn_application</span>
280
- 125: <span class="ruby-identifier">server</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">&quot;spawn_application&quot;</span>)
281
- 126: <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">socket_name</span>, <span class="ruby-identifier">socket_type</span> = <span class="ruby-identifier">server</span>.<span class="ruby-identifier">read</span>
282
- 127: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pid</span>.<span class="ruby-identifier">nil?</span>
283
- 128: <span class="ruby-identifier">raise</span> <span class="ruby-constant">IOError</span>, <span class="ruby-value str">&quot;Connection closed&quot;</span>
284
- 129: <span class="ruby-keyword kw">end</span>
285
- 130: <span class="ruby-identifier">owner_pipe</span> = <span class="ruby-identifier">server</span>.<span class="ruby-identifier">recv_io</span>
286
- 131: <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>,
287
- 132: <span class="ruby-identifier">socket_type</span>, <span class="ruby-identifier">owner_pipe</span>)
288
- 133: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SystemCallError</span>, <span class="ruby-constant">IOError</span>, <span class="ruby-constant">SocketError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
289
- 134: <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>
290
- 135: <span class="ruby-keyword kw">end</span>
291
- </pre>
292
- </div>
293
- </div>
294
- </div>
295
- <div class="method">
296
- <div class="title">
297
- <a name="M000071"></a><b>spawn_application!</b>()
298
- </div>
299
- <div class="description">
300
- <p>
301
- Spawn an instance of the RoR application. When successful, an <a
302
- href="../Application.html">Application</a> object will be returned, which
303
- represents the spawned RoR application.
304
- </p>
305
- <p>
306
- Unlike <a href="ApplicationSpawner.html#M000070">spawn_application</a>,
307
- this method may be called even when the <a
308
- href="ApplicationSpawner.html">ApplicationSpawner</a> server isn&#8216;t
309
- started. This allows one to spawn a RoR application without preloading any
310
- source files.
311
- </p>
312
- <p>
313
- This method may only be called if no Rails framework has been loaded in the
314
- current Ruby VM.
315
- </p>
316
- <p>
317
- Raises:
318
- </p>
319
- <ul>
320
- <li><a href="../AppInitError.html">AppInitError</a>: The Ruby on Rails
321
- application raised an exception or called exit() during startup.
322
-
323
- </li>
324
- <li>SystemCallError, IOError, SocketError: Something went wrong.
325
-
326
- </li>
327
- </ul>
328
- </div>
329
- <div class="sourcecode">
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
- <pre>
333
- <span class="ruby-comment cmt"># File lib/phusion_passenger/railz/application_spawner.rb, line 151</span>
334
- 151: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn_application!</span>
335
- 152: <span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span> = <span class="ruby-constant">UNIXSocket</span>.<span class="ruby-identifier">pair</span>
336
- 153: <span class="ruby-identifier">pid</span> = <span class="ruby-identifier">safe_fork</span>(<span class="ruby-value str">'application'</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">do</span>
337
- 154: <span class="ruby-keyword kw">begin</span>
338
- 155: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">close</span>
339
- 156:
340
- 157: <span class="ruby-identifier">file_descriptors_to_leave_open</span> = [<span class="ruby-value">0</span>, <span class="ruby-value">1</span>, <span class="ruby-value">2</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">fileno</span>]
341
- 158: <span class="ruby-constant">NativeSupport</span>.<span class="ruby-identifier">close_all_file_descriptors</span>(<span class="ruby-identifier">file_descriptors_to_leave_open</span>)
342
- 159: <span class="ruby-identifier">close_all_io_objects_for_fds</span>(<span class="ruby-identifier">file_descriptors_to_leave_open</span>)
343
- 160:
344
- 161: <span class="ruby-identifier">channel</span> = <span class="ruby-constant">MessageChannel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">b</span>)
345
- 162: <span class="ruby-identifier">success</span> = <span class="ruby-identifier">report_app_init_status</span>(<span class="ruby-identifier">channel</span>) <span class="ruby-keyword kw">do</span>
346
- 163: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'RAILS_ENV'</span>] = <span class="ruby-ivar">@environment</span>
347
- 164: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'RAILS_RELATIVE_URL_ROOT'</span>] = <span class="ruby-ivar">@base_uri</span>
348
- 165: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-ivar">@app_root</span>)
349
- 166: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@encoded_environment_variables</span>
350
- 167: <span class="ruby-identifier">set_passed_environment_variables</span>
351
- 168: <span class="ruby-keyword kw">end</span>
352
- 169: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@lower_privilege</span>
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
- 171: <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>
384
- </pre>
385
- </div>
386
- </div>
387
- </div>
388
- <div class="method">
389
- <div class="title">
390
- <a name="M000072"></a><b>start</b>()
391
- </div>
392
- <div class="description">
393
- <p>
394
- Overrided from <a
395
- href="../AbstractServer.html#M000127">AbstractServer#start</a>.
396
- </p>
397
- <p>
398
- May raise these additional exceptions:
399
- </p>
400
- <ul>
401
- <li><a href="../AppInitError.html">AppInitError</a>: The Ruby on Rails
402
- application raised an exception or called exit() during startup.
403
-
404
- </li>
405
- <li><a href="ApplicationSpawner/Error.html">ApplicationSpawner::Error</a>: The
406
- <a href="ApplicationSpawner.html">ApplicationSpawner</a> server exited
407
- unexpectedly.
408
-
409
- </li>
410
- </ul>
411
- </div>
412
- <div class="sourcecode">
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">
415
- <pre>
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>
429
- </pre>
430
- </div>
431
- </div>
432
- </div>
433
- </div>
434
-
435
- </div>
436
-
437
- </body>
438
- </html>