passenger 2.1.3 → 2.2.0

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 (398) hide show
  1. data/DEVELOPERS.TXT +2 -0
  2. data/INSTALL +3 -1
  3. data/LICENSE +19 -355
  4. data/NEWS +3 -0
  5. data/README +11 -4
  6. data/Rakefile +435 -236
  7. data/bin/passenger-config +20 -14
  8. data/bin/passenger-install-apache2-module +67 -201
  9. data/bin/passenger-install-nginx-module +477 -0
  10. data/bin/passenger-make-enterprisey +17 -12
  11. data/bin/passenger-memory-stats +33 -23
  12. data/bin/passenger-spawn-server +17 -12
  13. data/bin/passenger-status +18 -13
  14. data/bin/passenger-stress-test +17 -12
  15. data/doc/{Users guide.html → Users guide Apache.html } +79 -61
  16. data/doc/{Users guide.txt → Users guide Apache.txt } +43 -939
  17. data/doc/Users guide Nginx.html +2276 -0
  18. data/doc/Users guide Nginx.txt +776 -0
  19. data/doc/cxxapi/ApplicationPoolServer_8h-source.html +9 -4
  20. data/doc/cxxapi/ApplicationPool_8h-source.html +9 -4
  21. data/doc/cxxapi/Application_8h-source.html +26 -21
  22. data/doc/cxxapi/Bucket_8h-source.html +54 -44
  23. data/doc/cxxapi/CachedFileStat_8h-source.html +9 -4
  24. data/doc/cxxapi/Configuration_8h-source.html +357 -339
  25. data/doc/cxxapi/DirectoryMapper_8h-source.html +294 -280
  26. data/doc/cxxapi/DummySpawnManager_8h-source.html +9 -4
  27. data/doc/cxxapi/Exceptions_8h-source.html +9 -4
  28. data/doc/cxxapi/FileChecker_8h-source.html +9 -4
  29. data/doc/cxxapi/Hooks_8h-source.html +50 -40
  30. data/doc/cxxapi/Logging_8h-source.html +9 -4
  31. data/doc/cxxapi/MessageChannel_8h-source.html +20 -15
  32. data/doc/cxxapi/PoolOptions_8h-source.html +10 -5
  33. data/doc/cxxapi/SpawnManager_8h-source.html +9 -4
  34. data/doc/cxxapi/StandardApplicationPool_8h-source.html +10 -5
  35. data/doc/cxxapi/SystemTime_8h-source.html +9 -4
  36. data/doc/cxxapi/Utils_8h-source.html +242 -214
  37. data/doc/cxxapi/annotated.html +4 -28
  38. data/doc/cxxapi/classClient-members.html +4 -4
  39. data/doc/cxxapi/classClient.html +14 -11
  40. data/doc/cxxapi/classHooks-members.html +4 -5
  41. data/doc/cxxapi/classHooks.html +26 -24
  42. data/doc/cxxapi/classPassenger_1_1Application-members.html +4 -4
  43. data/doc/cxxapi/classPassenger_1_1Application.html +40 -37
  44. data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +4 -4
  45. data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +95 -92
  46. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer-members.html +4 -4
  47. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +26 -23
  48. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.map +1 -1
  49. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.md5 +1 -1
  50. data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.png +0 -0
  51. data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +17 -17
  52. data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +139 -136
  53. data/doc/cxxapi/classPassenger_1_1BufferedUpload-members.html +4 -4
  54. data/doc/cxxapi/classPassenger_1_1BufferedUpload.html +13 -10
  55. data/doc/cxxapi/classPassenger_1_1BusyException-members.html +4 -4
  56. data/doc/cxxapi/classPassenger_1_1BusyException.html +11 -8
  57. data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +4 -4
  58. data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +11 -8
  59. data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +4 -5
  60. data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +45 -43
  61. data/doc/cxxapi/classPassenger_1_1DummySpawnManager-members.html +4 -4
  62. data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +13 -10
  63. data/doc/cxxapi/classPassenger_1_1FileChecker-members.html +4 -4
  64. data/doc/cxxapi/classPassenger_1_1FileChecker.html +22 -19
  65. data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +4 -4
  66. data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +12 -9
  67. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.map +1 -1
  68. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.md5 +1 -1
  69. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.png +0 -0
  70. data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +4 -4
  71. data/doc/cxxapi/classPassenger_1_1FileSystemException.html +14 -11
  72. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.map +1 -1
  73. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.md5 +1 -1
  74. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.png +0 -0
  75. data/doc/cxxapi/classPassenger_1_1IOException-members.html +4 -4
  76. data/doc/cxxapi/classPassenger_1_1IOException.html +12 -9
  77. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +1 -1
  78. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +1 -1
  79. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
  80. data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +4 -4
  81. data/doc/cxxapi/classPassenger_1_1MessageChannel.html +228 -225
  82. data/doc/cxxapi/classPassenger_1_1RuntimeException-members.html +4 -4
  83. data/doc/cxxapi/classPassenger_1_1RuntimeException.html +11 -8
  84. data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +4 -4
  85. data/doc/cxxapi/classPassenger_1_1SpawnException.html +14 -11
  86. data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +4 -4
  87. data/doc/cxxapi/classPassenger_1_1SpawnManager.html +50 -47
  88. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +4 -4
  89. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +73 -70
  90. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.map +1 -1
  91. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.md5 +1 -1
  92. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.png +0 -0
  93. data/doc/cxxapi/classPassenger_1_1SystemException-members.html +4 -4
  94. data/doc/cxxapi/classPassenger_1_1SystemException.html +17 -14
  95. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +1 -1
  96. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +1 -1
  97. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
  98. data/doc/cxxapi/classPassenger_1_1SystemTime-members.html +4 -4
  99. data/doc/cxxapi/classPassenger_1_1SystemTime.html +14 -11
  100. data/doc/cxxapi/classes.html +35 -0
  101. data/doc/cxxapi/definitions_8h-source.html +9 -4
  102. data/doc/cxxapi/doxygen.css +311 -303
  103. data/doc/cxxapi/files.html +9 -18
  104. data/doc/cxxapi/functions.html +5 -224
  105. data/doc/cxxapi/functions_func.html +5 -185
  106. data/doc/cxxapi/functions_type.html +4 -4
  107. data/doc/cxxapi/functions_vars.html +4 -4
  108. data/doc/cxxapi/graph_legend.dot +19 -19
  109. data/doc/cxxapi/graph_legend.html +5 -5
  110. data/doc/cxxapi/graph_legend.png +0 -0
  111. data/doc/cxxapi/group__Configuration.html +11 -13
  112. data/doc/cxxapi/group__Configuration.png +0 -0
  113. data/doc/cxxapi/group__Core.html +10 -12
  114. data/doc/cxxapi/group__Core.png +0 -0
  115. data/doc/cxxapi/group__Exceptions.html +5 -7
  116. data/doc/cxxapi/group__Hooks.html +5 -7
  117. data/doc/cxxapi/group__Hooks.png +0 -0
  118. data/doc/cxxapi/group__Support.html +5 -624
  119. data/doc/cxxapi/hierarchy.html +6 -6
  120. data/doc/cxxapi/inherit__graph__0.map +1 -1
  121. data/doc/cxxapi/inherit__graph__0.md5 +1 -1
  122. data/doc/cxxapi/inherit__graph__0.png +0 -0
  123. data/doc/cxxapi/inherit__graph__1.map +1 -1
  124. data/doc/cxxapi/inherit__graph__1.md5 +1 -1
  125. data/doc/cxxapi/inherit__graph__1.png +0 -0
  126. data/doc/cxxapi/inherit__graph__10.map +1 -1
  127. data/doc/cxxapi/inherit__graph__10.md5 +1 -1
  128. data/doc/cxxapi/inherit__graph__10.png +0 -0
  129. data/doc/cxxapi/inherit__graph__11.map +1 -1
  130. data/doc/cxxapi/inherit__graph__11.md5 +1 -1
  131. data/doc/cxxapi/inherit__graph__11.png +0 -0
  132. data/doc/cxxapi/inherit__graph__12.map +1 -1
  133. data/doc/cxxapi/inherit__graph__12.md5 +1 -1
  134. data/doc/cxxapi/inherit__graph__12.png +0 -0
  135. data/doc/cxxapi/inherit__graph__13.map +1 -2
  136. data/doc/cxxapi/inherit__graph__13.md5 +1 -1
  137. data/doc/cxxapi/inherit__graph__13.png +0 -0
  138. data/doc/cxxapi/inherit__graph__14.map +2 -1
  139. data/doc/cxxapi/inherit__graph__14.md5 +1 -1
  140. data/doc/cxxapi/inherit__graph__14.png +0 -0
  141. data/doc/cxxapi/inherit__graph__15.map +1 -1
  142. data/doc/cxxapi/inherit__graph__15.md5 +1 -1
  143. data/doc/cxxapi/inherit__graph__15.png +0 -0
  144. data/doc/cxxapi/inherit__graph__16.map +1 -1
  145. data/doc/cxxapi/inherit__graph__16.md5 +1 -1
  146. data/doc/cxxapi/inherit__graph__16.png +0 -0
  147. data/doc/cxxapi/inherit__graph__17.map +1 -1
  148. data/doc/cxxapi/inherit__graph__17.md5 +1 -1
  149. data/doc/cxxapi/inherit__graph__17.png +0 -0
  150. data/doc/cxxapi/inherit__graph__18.map +1 -1
  151. data/doc/cxxapi/inherit__graph__18.md5 +1 -1
  152. data/doc/cxxapi/inherit__graph__18.png +0 -0
  153. data/doc/cxxapi/inherit__graph__19.map +1 -1
  154. data/doc/cxxapi/inherit__graph__19.md5 +1 -1
  155. data/doc/cxxapi/inherit__graph__19.png +0 -0
  156. data/doc/cxxapi/inherit__graph__2.map +1 -1
  157. data/doc/cxxapi/inherit__graph__2.md5 +1 -1
  158. data/doc/cxxapi/inherit__graph__2.png +0 -0
  159. data/doc/cxxapi/inherit__graph__20.map +2 -2
  160. data/doc/cxxapi/inherit__graph__20.md5 +1 -1
  161. data/doc/cxxapi/inherit__graph__20.png +0 -0
  162. data/doc/cxxapi/inherit__graph__21.map +1 -1
  163. data/doc/cxxapi/inherit__graph__21.md5 +1 -1
  164. data/doc/cxxapi/inherit__graph__21.png +0 -0
  165. data/doc/cxxapi/inherit__graph__3.map +1 -1
  166. data/doc/cxxapi/inherit__graph__3.md5 +1 -1
  167. data/doc/cxxapi/inherit__graph__3.png +0 -0
  168. data/doc/cxxapi/inherit__graph__4.map +1 -1
  169. data/doc/cxxapi/inherit__graph__4.md5 +1 -1
  170. data/doc/cxxapi/inherit__graph__4.png +0 -0
  171. data/doc/cxxapi/inherit__graph__5.map +1 -2
  172. data/doc/cxxapi/inherit__graph__5.md5 +1 -1
  173. data/doc/cxxapi/inherit__graph__5.png +0 -0
  174. data/doc/cxxapi/inherit__graph__6.map +2 -1
  175. data/doc/cxxapi/inherit__graph__6.md5 +1 -1
  176. data/doc/cxxapi/inherit__graph__6.png +0 -0
  177. data/doc/cxxapi/inherit__graph__7.map +1 -1
  178. data/doc/cxxapi/inherit__graph__7.md5 +1 -1
  179. data/doc/cxxapi/inherit__graph__7.png +0 -0
  180. data/doc/cxxapi/inherit__graph__8.map +1 -1
  181. data/doc/cxxapi/inherit__graph__8.md5 +1 -1
  182. data/doc/cxxapi/inherit__graph__8.png +0 -0
  183. data/doc/cxxapi/inherit__graph__9.map +1 -1
  184. data/doc/cxxapi/inherit__graph__9.md5 +1 -1
  185. data/doc/cxxapi/inherit__graph__9.png +0 -0
  186. data/doc/cxxapi/inherits.html +41 -41
  187. data/doc/cxxapi/main.html +4 -4
  188. data/doc/cxxapi/modules.html +4 -5
  189. data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +4 -4
  190. data/doc/cxxapi/structPassenger_1_1AnythingToString.html +13 -10
  191. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +5 -5
  192. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +16 -13
  193. data/doc/cxxapi/structPassenger_1_1PoolOptions-members.html +4 -4
  194. data/doc/cxxapi/structPassenger_1_1PoolOptions.html +63 -60
  195. data/doc/cxxapi/tabs.css +5 -2
  196. data/doc/cxxapi/tree.html +7 -81
  197. data/doc/rdoc/classes/ConditionVariable.html +59 -59
  198. data/doc/rdoc/classes/Exception.html +11 -11
  199. data/doc/rdoc/classes/GC.html +4 -4
  200. data/doc/rdoc/classes/IO.html +14 -14
  201. data/doc/rdoc/classes/PhusionPassenger.html +75 -20
  202. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +153 -0
  203. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +125 -130
  204. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +236 -236
  205. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +213 -213
  206. data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +28 -28
  207. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +91 -75
  208. data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +10 -10
  209. data/doc/rdoc/classes/PhusionPassenger/Application.html +64 -64
  210. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +34 -34
  211. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +13 -13
  212. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +30 -30
  213. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +10 -10
  214. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +136 -136
  215. data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +24 -24
  216. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +42 -42
  217. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +55 -53
  218. data/doc/rdoc/classes/PhusionPassenger/Railz.html +1 -1
  219. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +25 -30
  220. data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +23 -23
  221. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +116 -117
  222. data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +22 -22
  223. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +118 -124
  224. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +10 -10
  225. data/doc/rdoc/classes/PhusionPassenger/Utils.html +354 -354
  226. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +9 -9
  227. data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +37 -37
  228. data/doc/rdoc/classes/PlatformInfo.html +282 -261
  229. data/doc/rdoc/classes/RakeExtensions.html +7 -7
  230. data/doc/rdoc/classes/Signal.html +26 -26
  231. data/doc/rdoc/created.rid +1 -1
  232. data/doc/rdoc/files/DEVELOPERS_TXT.html +6 -1
  233. data/doc/rdoc/files/README.html +15 -6
  234. data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +1 -1
  235. data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +129 -0
  236. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +20 -13
  237. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +19 -13
  238. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +19 -13
  239. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +31 -1
  240. data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +31 -1
  241. data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +19 -13
  242. data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +19 -13
  243. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +21 -12
  244. data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +19 -13
  245. data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +19 -13
  246. data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +19 -13
  247. data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +19 -13
  248. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +19 -13
  249. data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
  250. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +19 -13
  251. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +22 -12
  252. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +21 -12
  253. data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +19 -13
  254. data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +1 -1
  255. data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +19 -13
  256. data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +21 -12
  257. data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +19 -13
  258. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +19 -13
  259. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +27 -21
  260. data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +21 -12
  261. data/doc/rdoc/files/misc/rake/extensions_rb.html +21 -12
  262. data/doc/rdoc/fr_class_index.html +1 -0
  263. data/doc/rdoc/fr_file_index.html +2 -0
  264. data/doc/rdoc/fr_method_index.html +116 -112
  265. data/doc/users_guide_snippets/analysis_and_system_maintenance_tools.txt +144 -0
  266. data/doc/users_guide_snippets/appendix_a_about.txt +13 -0
  267. data/doc/users_guide_snippets/appendix_b_terminology.txt +63 -0
  268. data/doc/users_guide_snippets/appendix_c_spawning_methods.txt +304 -0
  269. data/doc/users_guide_snippets/global_queueing_explained.txt +78 -0
  270. data/doc/users_guide_snippets/rackup_specifications.txt +75 -0
  271. data/doc/users_guide_snippets/rails_spawn_method.txt +48 -0
  272. data/doc/users_guide_snippets/tips.txt +173 -0
  273. data/ext/apache2/Bucket.cpp +17 -12
  274. data/ext/apache2/Bucket.h +17 -12
  275. data/ext/apache2/Configuration.cpp +17 -12
  276. data/ext/apache2/Configuration.h +27 -14
  277. data/ext/apache2/DirectoryMapper.h +21 -12
  278. data/ext/apache2/Hooks.cpp +67 -21
  279. data/ext/apache2/Hooks.h +17 -12
  280. data/ext/apache2/mod_passenger.c +17 -12
  281. data/ext/{apache2 → common}/Application.h +19 -14
  282. data/ext/{apache2 → common}/ApplicationPool.h +17 -12
  283. data/ext/{apache2 → common}/ApplicationPoolServer.h +18 -72
  284. data/ext/{apache2 → common}/ApplicationPoolServerExecutable.cpp +45 -104
  285. data/ext/common/ApplicationPoolStatusReporter.h +212 -0
  286. data/ext/{apache2 → common}/CachedFileStat.cpp +17 -12
  287. data/ext/{apache2 → common}/CachedFileStat.h +17 -12
  288. data/ext/{apache2 → common}/DummySpawnManager.h +17 -12
  289. data/ext/{apache2 → common}/Exceptions.h +17 -12
  290. data/ext/{apache2 → common}/FileChecker.h +17 -12
  291. data/ext/common/Logging.cpp +65 -0
  292. data/ext/{apache2 → common}/Logging.h +17 -12
  293. data/ext/{apache2 → common}/MessageChannel.h +17 -12
  294. data/ext/{apache2 → common}/PoolOptions.h +17 -12
  295. data/ext/{apache2 → common}/SpawnManager.h +17 -12
  296. data/ext/{apache2 → common}/StandardApplicationPool.h +17 -12
  297. data/ext/common/StaticString.h +147 -0
  298. data/ext/common/SystemTime.cpp +33 -0
  299. data/ext/{apache2 → common}/SystemTime.h +17 -12
  300. data/ext/{apache2 → common}/Utils.cpp +69 -12
  301. data/ext/{apache2 → common}/Utils.h +41 -12
  302. data/ext/nginx/Configuration.c +1091 -0
  303. data/ext/nginx/Configuration.h +71 -0
  304. data/ext/nginx/ContentHandler.c +1154 -0
  305. data/ext/nginx/ContentHandler.h +64 -0
  306. data/ext/nginx/HelperServer.cpp +857 -0
  307. data/ext/nginx/HttpStatusExtractor.h +161 -0
  308. data/ext/nginx/ScgiRequestParser.h +317 -0
  309. data/ext/nginx/StaticContentHandler.c +222 -0
  310. data/ext/nginx/StaticContentHandler.h +37 -0
  311. data/ext/nginx/config +41 -0
  312. data/ext/nginx/ngx_http_passenger_module.c +572 -0
  313. data/ext/nginx/ngx_http_passenger_module.h +72 -0
  314. data/ext/oxt/backtrace.cpp +8 -1
  315. data/ext/oxt/system_calls.cpp +40 -0
  316. data/ext/oxt/system_calls.hpp +14 -7
  317. data/ext/phusion_passenger/extconf.rb +17 -12
  318. data/ext/phusion_passenger/native_support.c +19 -12
  319. data/lib/phusion_passenger/abstract_installer.rb +196 -0
  320. data/lib/phusion_passenger/abstract_request_handler.rb +19 -24
  321. data/lib/phusion_passenger/abstract_server.rb +17 -12
  322. data/lib/phusion_passenger/abstract_server_collection.rb +17 -12
  323. data/lib/phusion_passenger/admin_tools.rb +23 -0
  324. data/lib/phusion_passenger/admin_tools/control_process.rb +39 -13
  325. data/lib/phusion_passenger/application.rb +17 -12
  326. data/lib/phusion_passenger/console_text_template.rb +17 -12
  327. data/lib/phusion_passenger/constants.rb +22 -11
  328. data/lib/phusion_passenger/dependencies.rb +47 -12
  329. data/lib/phusion_passenger/events.rb +17 -12
  330. data/lib/phusion_passenger/exceptions.rb +17 -12
  331. data/lib/phusion_passenger/html_template.rb +17 -12
  332. data/lib/phusion_passenger/message_channel.rb +17 -12
  333. data/lib/phusion_passenger/packaging.rb +39 -0
  334. data/lib/phusion_passenger/platform_info.rb +48 -22
  335. data/lib/phusion_passenger/rack/application_spawner.rb +22 -11
  336. data/lib/phusion_passenger/rack/request_handler.rb +21 -12
  337. data/lib/phusion_passenger/railz/application_spawner.rb +23 -23
  338. data/lib/phusion_passenger/railz/framework_spawner.rb +18 -14
  339. data/lib/phusion_passenger/railz/request_handler.rb +18 -11
  340. data/lib/phusion_passenger/simple_benchmarking.rb +17 -12
  341. data/lib/phusion_passenger/spawn_manager.rb +17 -20
  342. data/lib/phusion_passenger/templates/{apache_must_be_compiled_with_compatible_mpm.txt.erb → apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb} +0 -0
  343. data/lib/phusion_passenger/templates/{apache2_config_snippets.txt.erb → apache2/config_snippets.txt.erb} +0 -0
  344. data/lib/phusion_passenger/templates/{deployment_example.txt.erb → apache2/deployment_example.txt.erb} +0 -0
  345. data/lib/phusion_passenger/templates/{no_write_permission_to_passenger_root.txt.erb → apache2/no_write_permission_to_passenger_root.txt.erb} +0 -0
  346. data/lib/phusion_passenger/templates/{possible_solutions_for_compilation_and_installation_problems.txt.erb → apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb} +0 -0
  347. data/lib/phusion_passenger/templates/{run_installer_as_root.txt.erb → apache2/run_installer_as_root.txt.erb} +0 -0
  348. data/lib/phusion_passenger/templates/{welcome.txt.erb → apache2/welcome.txt.erb} +0 -0
  349. data/lib/phusion_passenger/templates/nginx/ask_for_extra_configure_flags.txt.erb +8 -0
  350. data/lib/phusion_passenger/templates/nginx/cannot_write_to_dir.txt.erb +11 -0
  351. data/lib/phusion_passenger/templates/nginx/config_snippets.txt.erb +17 -0
  352. data/lib/phusion_passenger/templates/nginx/config_snippets_inserted.txt.erb +20 -0
  353. data/lib/phusion_passenger/templates/nginx/confirm_extra_configure_flags.txt.erb +5 -0
  354. data/lib/phusion_passenger/templates/nginx/deployment_example.txt.erb +22 -0
  355. data/lib/phusion_passenger/templates/nginx/pcre_could_not_be_downloaded.txt.erb +11 -0
  356. data/lib/phusion_passenger/templates/nginx/pcre_could_not_be_extracted.txt.erb +11 -0
  357. data/lib/phusion_passenger/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb +11 -0
  358. data/lib/phusion_passenger/templates/nginx/possible_solutions_for_download_and_extraction_problems.txt.erb +20 -0
  359. data/lib/phusion_passenger/templates/nginx/query_download_and_install.txt.erb +21 -0
  360. data/lib/phusion_passenger/templates/nginx/run_installer_as_root.txt.erb +8 -0
  361. data/lib/phusion_passenger/templates/nginx/welcome.txt.erb +15 -0
  362. data/lib/phusion_passenger/utils.rb +20 -15
  363. data/lib/phusion_passenger/wsgi/application_spawner.rb +18 -11
  364. data/lib/phusion_passenger/wsgi/request_handler.py +23 -0
  365. data/misc/copy_boost_headers.rb +23 -0
  366. data/misc/find_owner_pipe_leaks.rb +18 -11
  367. data/misc/rake/cplusplus.rb +18 -11
  368. data/misc/rake/extensions.rb +21 -14
  369. data/misc/render_error_pages.rb +18 -11
  370. data/test/ApplicationPoolServerTest.cpp +1 -3
  371. data/test/ApplicationPoolServer_ApplicationPoolTest.cpp +1 -1
  372. data/test/CxxTestMain.cpp +19 -3
  373. data/test/HttpStatusExtractorTest.cpp +181 -0
  374. data/test/ScgiRequestParserTest.cpp +337 -0
  375. data/test/StaticStringTest.cpp +51 -0
  376. data/test/UtilsTest.cpp +32 -0
  377. data/test/config.yml.example +5 -0
  378. data/test/{integration_tests.rb → integration_tests/apache2_tests.rb} +7 -299
  379. data/test/integration_tests/hello_world_rack_spec.rb +36 -0
  380. data/test/integration_tests/hello_world_wsgi_spec.rb +41 -0
  381. data/test/integration_tests/mycook_spec.rb +192 -0
  382. data/test/integration_tests/nginx_tests.rb +98 -0
  383. data/test/ruby/rack/application_spawner_spec.rb +40 -0
  384. data/test/stub/nginx/koi-utf +109 -0
  385. data/test/stub/nginx/koi-win +103 -0
  386. data/test/stub/nginx/mime.types +70 -0
  387. data/test/stub/nginx/nginx.conf.erb +57 -0
  388. data/test/stub/nginx/win-utf +126 -0
  389. data/test/stub/rails_apps/mycook/app/controllers/uploads_controller.rb +4 -0
  390. data/test/stub/rails_apps/mycook/config/routes.rb +1 -1
  391. data/test/stub/wsgi/passenger_wsgi.pyc +0 -0
  392. data/test/support/Support.h +40 -0
  393. data/test/support/nginx_controller.rb +98 -0
  394. data/test/support/test_helper.rb +79 -0
  395. metadata +1091 -1028
  396. data/benchmark/DummyRequestHandler.cpp +0 -101
  397. data/ext/apache2/Logging.cpp +0 -60
  398. data/ext/apache2/SystemTime.cpp +0 -28
@@ -80,9 +80,9 @@ Object
80
80
 
81
81
  <div class="sectiontitle">Methods</div>
82
82
  <ul>
83
- <li><a href="#M000120">[]=</a></li>
84
- <li><a href="#M000119">new</a></li>
85
- <li><a href="#M000121">result</a></li>
83
+ <li><a href="#M000123">[]=</a></li>
84
+ <li><a href="#M000122">new</a></li>
85
+ <li><a href="#M000124">result</a></li>
86
86
  </ul>
87
87
 
88
88
 
@@ -106,26 +106,26 @@ Object
106
106
  <div class="sectiontitle">Public Class methods</div>
107
107
  <div class="method">
108
108
  <div class="title">
109
- <a name="M000119"></a><b>new</b>(input, options = {})
109
+ <a name="M000122"></a><b>new</b>(input, options = {})
110
110
  </div>
111
111
  <div class="sourcecode">
112
- <p class="source-link">[ <a href="javascript:toggleSource('M000119_source')" id="l_M000119_source">show source</a> ]</p>
113
- <div id="M000119_source" class="dyn-source">
112
+ <p class="source-link">[ <a href="javascript:toggleSource('M000122_source')" id="l_M000122_source">show source</a> ]</p>
113
+ <div id="M000122_source" class="dyn-source">
114
114
  <pre>
115
- <span class="ruby-comment cmt"># File lib/phusion_passenger/console_text_template.rb, line 25</span>
116
- 25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">options</span> = {})
117
- 26: <span class="ruby-ivar">@buffer</span> = <span class="ruby-value str">''</span>
118
- 27: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">input</span>[<span class="ruby-identifier">:file</span>]
119
- 28: <span class="ruby-identifier">data</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-node">&quot;#{TEMPLATE_DIR}/#{input[:file]}.txt.erb&quot;</span>)
120
- 29: <span class="ruby-keyword kw">else</span>
121
- 30: <span class="ruby-identifier">data</span> = <span class="ruby-identifier">input</span>[<span class="ruby-identifier">:text</span>]
122
- 31: <span class="ruby-keyword kw">end</span>
123
- 32: <span class="ruby-ivar">@template</span> = <span class="ruby-constant">ERB</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">substitute_color_tags</span>(<span class="ruby-identifier">data</span>),
124
- 33: <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">'@buffer'</span>)
125
- 34: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
126
- 35: <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
115
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/console_text_template.rb, line 30</span>
116
+ 30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">input</span>, <span class="ruby-identifier">options</span> = {})
117
+ 31: <span class="ruby-ivar">@buffer</span> = <span class="ruby-value str">''</span>
118
+ 32: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">input</span>[<span class="ruby-identifier">:file</span>]
119
+ 33: <span class="ruby-identifier">data</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-node">&quot;#{TEMPLATE_DIR}/#{input[:file]}.txt.erb&quot;</span>)
120
+ 34: <span class="ruby-keyword kw">else</span>
121
+ 35: <span class="ruby-identifier">data</span> = <span class="ruby-identifier">input</span>[<span class="ruby-identifier">:text</span>]
127
122
  36: <span class="ruby-keyword kw">end</span>
128
- 37: <span class="ruby-keyword kw">end</span>
123
+ 37: <span class="ruby-ivar">@template</span> = <span class="ruby-constant">ERB</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">substitute_color_tags</span>(<span class="ruby-identifier">data</span>),
124
+ 38: <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">'@buffer'</span>)
125
+ 39: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
126
+ 40: <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
127
+ 41: <span class="ruby-keyword kw">end</span>
128
+ 42: <span class="ruby-keyword kw">end</span>
129
129
  </pre>
130
130
  </div>
131
131
  </div>
@@ -133,33 +133,33 @@ Object
133
133
  <div class="sectiontitle">Public Instance methods</div>
134
134
  <div class="method">
135
135
  <div class="title">
136
- <a name="M000120"></a><b>[]=</b>(name, value)
136
+ <a name="M000123"></a><b>[]=</b>(name, value)
137
137
  </div>
138
138
  <div class="sourcecode">
139
- <p class="source-link">[ <a href="javascript:toggleSource('M000120_source')" id="l_M000120_source">show source</a> ]</p>
140
- <div id="M000120_source" class="dyn-source">
139
+ <p class="source-link">[ <a href="javascript:toggleSource('M000123_source')" id="l_M000123_source">show source</a> ]</p>
140
+ <div id="M000123_source" class="dyn-source">
141
141
  <pre>
142
- <span class="ruby-comment cmt"># File lib/phusion_passenger/console_text_template.rb, line 39</span>
143
- 39: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
144
- 40: <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{name}&quot;</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">value</span>)
145
- 41: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
146
- 42: <span class="ruby-keyword kw">end</span>
142
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/console_text_template.rb, line 44</span>
143
+ 44: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
144
+ 45: <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{name}&quot;</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">value</span>)
145
+ 46: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
146
+ 47: <span class="ruby-keyword kw">end</span>
147
147
  </pre>
148
148
  </div>
149
149
  </div>
150
150
  </div>
151
151
  <div class="method">
152
152
  <div class="title">
153
- <a name="M000121"></a><b>result</b>()
153
+ <a name="M000124"></a><b>result</b>()
154
154
  </div>
155
155
  <div class="sourcecode">
156
- <p class="source-link">[ <a href="javascript:toggleSource('M000121_source')" id="l_M000121_source">show source</a> ]</p>
157
- <div id="M000121_source" class="dyn-source">
156
+ <p class="source-link">[ <a href="javascript:toggleSource('M000124_source')" id="l_M000124_source">show source</a> ]</p>
157
+ <div id="M000124_source" class="dyn-source">
158
158
  <pre>
159
- <span class="ruby-comment cmt"># File lib/phusion_passenger/console_text_template.rb, line 44</span>
160
- 44: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">result</span>
161
- 45: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@template</span>.<span class="ruby-identifier">result</span>(<span class="ruby-identifier">binding</span>)
162
- 46: <span class="ruby-keyword kw">end</span>
159
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/console_text_template.rb, line 49</span>
160
+ 49: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">result</span>
161
+ 50: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@template</span>.<span class="ruby-identifier">result</span>(<span class="ruby-identifier">binding</span>)
162
+ 51: <span class="ruby-keyword kw">end</span>
163
163
  </pre>
164
164
  </div>
165
165
  </div>
@@ -90,7 +90,7 @@ attribute is guaranteed non-nil.
90
90
 
91
91
  <div class="sectiontitle">Methods</div>
92
92
  <ul>
93
- <li><a href="#M000103">new</a></li>
93
+ <li><a href="#M000105">new</a></li>
94
94
  </ul>
95
95
 
96
96
 
@@ -118,21 +118,21 @@ attribute is guaranteed non-nil.
118
118
  <div class="sectiontitle">Public Class methods</div>
119
119
  <div class="method">
120
120
  <div class="title">
121
- <a name="M000103"></a><b>new</b>(message, child_exception, options)
121
+ <a name="M000105"></a><b>new</b>(message, child_exception, options)
122
122
  </div>
123
123
  <div class="sourcecode">
124
- <p class="source-link">[ <a href="javascript:toggleSource('M000103_source')" id="l_M000103_source">show source</a> ]</p>
125
- <div id="M000103_source" class="dyn-source">
124
+ <p class="source-link">[ <a href="javascript:toggleSource('M000105_source')" id="l_M000105_source">show source</a> ]</p>
125
+ <div id="M000105_source" class="dyn-source">
126
126
  <pre>
127
- <span class="ruby-comment cmt"># File lib/phusion_passenger/exceptions.rb, line 75</span>
128
- 75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">child_exception</span>, <span class="ruby-identifier">options</span>)
129
- 76: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">child_exception</span>)
130
- 77: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:vendor</span>]
131
- 78: <span class="ruby-ivar">@vendor</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:vendor</span>]
132
- 79: <span class="ruby-keyword kw">else</span>
133
- 80: <span class="ruby-ivar">@version</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:version</span>]
134
- 81: <span class="ruby-keyword kw">end</span>
135
- 82: <span class="ruby-keyword kw">end</span>
127
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/exceptions.rb, line 80</span>
128
+ 80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">child_exception</span>, <span class="ruby-identifier">options</span>)
129
+ 81: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">child_exception</span>)
130
+ 82: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:vendor</span>]
131
+ 83: <span class="ruby-ivar">@vendor</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:vendor</span>]
132
+ 84: <span class="ruby-keyword kw">else</span>
133
+ 85: <span class="ruby-ivar">@version</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:version</span>]
134
+ 86: <span class="ruby-keyword kw">end</span>
135
+ 87: <span class="ruby-keyword kw">end</span>
136
136
  </pre>
137
137
  </div>
138
138
  </div>
@@ -84,9 +84,9 @@ A convenience utility class for rendering our error pages.
84
84
 
85
85
  <div class="sectiontitle">Methods</div>
86
86
  <ul>
87
- <li><a href="#M000105">[]=</a></li>
88
- <li><a href="#M000104">new</a></li>
89
- <li><a href="#M000106">result</a></li>
87
+ <li><a href="#M000107">[]=</a></li>
88
+ <li><a href="#M000106">new</a></li>
89
+ <li><a href="#M000108">result</a></li>
90
90
  </ul>
91
91
 
92
92
  <div class="sectiontitle">Included Modules</div>
@@ -114,21 +114,21 @@ A convenience utility class for rendering our error pages.
114
114
  <div class="sectiontitle">Public Class methods</div>
115
115
  <div class="method">
116
116
  <div class="title">
117
- <a name="M000104"></a><b>new</b>(template_name, options = {})
117
+ <a name="M000106"></a><b>new</b>(template_name, options = {})
118
118
  </div>
119
119
  <div class="sourcecode">
120
- <p class="source-link">[ <a href="javascript:toggleSource('M000104_source')" id="l_M000104_source">show source</a> ]</p>
121
- <div id="M000104_source" class="dyn-source">
120
+ <p class="source-link">[ <a href="javascript:toggleSource('M000106_source')" id="l_M000106_source">show source</a> ]</p>
121
+ <div id="M000106_source" class="dyn-source">
122
122
  <pre>
123
- <span class="ruby-comment cmt"># File lib/phusion_passenger/html_template.rb, line 28</span>
124
- 28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">template_name</span>, <span class="ruby-identifier">options</span> = {})
125
- 29: <span class="ruby-ivar">@buffer</span> = <span class="ruby-value str">''</span>
126
- 30: <span class="ruby-ivar">@template</span> = <span class="ruby-constant">ERB</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-node">&quot;#{TEMPLATE_DIR}/#{template_name}.html.erb&quot;</span>),
127
- 31: <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">'@buffer'</span>)
128
- 32: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
129
- 33: <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
130
- 34: <span class="ruby-keyword kw">end</span>
131
- 35: <span class="ruby-keyword kw">end</span>
123
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/html_template.rb, line 33</span>
124
+ 33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">template_name</span>, <span class="ruby-identifier">options</span> = {})
125
+ 34: <span class="ruby-ivar">@buffer</span> = <span class="ruby-value str">''</span>
126
+ 35: <span class="ruby-ivar">@template</span> = <span class="ruby-constant">ERB</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-node">&quot;#{TEMPLATE_DIR}/#{template_name}.html.erb&quot;</span>),
127
+ 36: <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">'@buffer'</span>)
128
+ 37: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
129
+ 38: <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>
130
+ 39: <span class="ruby-keyword kw">end</span>
131
+ 40: <span class="ruby-keyword kw">end</span>
132
132
  </pre>
133
133
  </div>
134
134
  </div>
@@ -136,33 +136,33 @@ A convenience utility class for rendering our error pages.
136
136
  <div class="sectiontitle">Public Instance methods</div>
137
137
  <div class="method">
138
138
  <div class="title">
139
- <a name="M000105"></a><b>[]=</b>(name, value)
139
+ <a name="M000107"></a><b>[]=</b>(name, value)
140
140
  </div>
141
141
  <div class="sourcecode">
142
- <p class="source-link">[ <a href="javascript:toggleSource('M000105_source')" id="l_M000105_source">show source</a> ]</p>
143
- <div id="M000105_source" class="dyn-source">
142
+ <p class="source-link">[ <a href="javascript:toggleSource('M000107_source')" id="l_M000107_source">show source</a> ]</p>
143
+ <div id="M000107_source" class="dyn-source">
144
144
  <pre>
145
- <span class="ruby-comment cmt"># File lib/phusion_passenger/html_template.rb, line 37</span>
146
- 37: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
147
- 38: <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{name}&quot;</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">value</span>)
148
- 39: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
149
- 40: <span class="ruby-keyword kw">end</span>
145
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/html_template.rb, line 42</span>
146
+ 42: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
147
+ 43: <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{name}&quot;</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">value</span>)
148
+ 44: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
149
+ 45: <span class="ruby-keyword kw">end</span>
150
150
  </pre>
151
151
  </div>
152
152
  </div>
153
153
  </div>
154
154
  <div class="method">
155
155
  <div class="title">
156
- <a name="M000106"></a><b>result</b>()
156
+ <a name="M000108"></a><b>result</b>()
157
157
  </div>
158
158
  <div class="sourcecode">
159
- <p class="source-link">[ <a href="javascript:toggleSource('M000106_source')" id="l_M000106_source">show source</a> ]</p>
160
- <div id="M000106_source" class="dyn-source">
159
+ <p class="source-link">[ <a href="javascript:toggleSource('M000108_source')" id="l_M000108_source">show source</a> ]</p>
160
+ <div id="M000108_source" class="dyn-source">
161
161
  <pre>
162
- <span class="ruby-comment cmt"># File lib/phusion_passenger/html_template.rb, line 42</span>
163
- 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">result</span>
164
- 43: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@template</span>.<span class="ruby-identifier">result</span>(<span class="ruby-identifier">binding</span>)
165
- 44: <span class="ruby-keyword kw">end</span>
162
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/html_template.rb, line 47</span>
163
+ 47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">result</span>
164
+ 48: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@template</span>.<span class="ruby-identifier">result</span>(<span class="ruby-identifier">binding</span>)
165
+ 49: <span class="ruby-keyword kw">end</span>
166
166
  </pre>
167
167
  </div>
168
168
  </div>
@@ -86,7 +86,7 @@ the failure when initializing something.
86
86
 
87
87
  <div class="sectiontitle">Methods</div>
88
88
  <ul>
89
- <li><a href="#M000090">new</a></li>
89
+ <li><a href="#M000092">new</a></li>
90
90
  </ul>
91
91
 
92
92
 
@@ -110,25 +110,25 @@ The exception that caused initialization to fail. This may be nil.
110
110
  <div class="sectiontitle">Public Class methods</div>
111
111
  <div class="method">
112
112
  <div class="title">
113
- <a name="M000090"></a><b>new</b>(message, child_exception = nil)
113
+ <a name="M000092"></a><b>new</b>(message, child_exception = nil)
114
114
  </div>
115
115
  <div class="description">
116
116
  <p>
117
- Create a <a href="InitializationError.html#M000090">new</a> <a
117
+ Create a <a href="InitializationError.html#M000092">new</a> <a
118
118
  href="InitializationError.html">InitializationError</a>. <tt>message</tt>
119
119
  is the error message, and <tt>child_exception</tt> is the exception that
120
120
  caused initialization to fail.
121
121
  </p>
122
122
  </div>
123
123
  <div class="sourcecode">
124
- <p class="source-link">[ <a href="javascript:toggleSource('M000090_source')" id="l_M000090_source">show source</a> ]</p>
125
- <div id="M000090_source" class="dyn-source">
124
+ <p class="source-link">[ <a href="javascript:toggleSource('M000092_source')" id="l_M000092_source">show source</a> ]</p>
125
+ <div id="M000092_source" class="dyn-source">
126
126
  <pre>
127
- <span class="ruby-comment cmt"># File lib/phusion_passenger/exceptions.rb, line 43</span>
128
- 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">child_exception</span> = <span class="ruby-keyword kw">nil</span>)
129
- 44: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">message</span>)
130
- 45: <span class="ruby-ivar">@child_exception</span> = <span class="ruby-identifier">child_exception</span>
131
- 46: <span class="ruby-keyword kw">end</span>
127
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/exceptions.rb, line 48</span>
128
+ 48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">child_exception</span> = <span class="ruby-keyword kw">nil</span>)
129
+ 49: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">message</span>)
130
+ 50: <span class="ruby-ivar">@child_exception</span> = <span class="ruby-identifier">child_exception</span>
131
+ 51: <span class="ruby-keyword kw">end</span>
132
132
  </pre>
133
133
  </div>
134
134
  </div>
@@ -134,8 +134,8 @@ The life time of a <a href="MessageChannel.html">MessageChannel</a> is
134
134
  independent from that of the wrapped <a href="../IO.html">IO</a> object. If
135
135
  a <a href="MessageChannel.html">MessageChannel</a> object is destroyed, the
136
136
  underlying <a href="../IO.html">IO</a> object is not automatically closed.
137
- Call <a href="MessageChannel.html#M000145">close</a>() if you want to <a
138
- href="MessageChannel.html#M000145">close</a> the underlying <a
137
+ Call <a href="MessageChannel.html#M000147">close</a>() if you want to <a
138
+ href="MessageChannel.html#M000147">close</a> the underlying <a
139
139
  href="../IO.html">IO</a> object.
140
140
  </p>
141
141
  <p>
@@ -154,15 +154,15 @@ things in the wrong order then bad things will happen.
154
154
 
155
155
  <div class="sectiontitle">Methods</div>
156
156
  <ul>
157
- <li><a href="#M000145">close</a></li>
158
- <li><a href="#M000144">fileno</a></li>
159
- <li><a href="#M000137">new</a></li>
160
- <li><a href="#M000138">read</a></li>
161
- <li><a href="#M000139">read_scalar</a></li>
162
- <li><a href="#M000142">recv_io</a></li>
163
- <li><a href="#M000143">send_io</a></li>
164
- <li><a href="#M000140">write</a></li>
165
- <li><a href="#M000141">write_scalar</a></li>
157
+ <li><a href="#M000147">close</a></li>
158
+ <li><a href="#M000146">fileno</a></li>
159
+ <li><a href="#M000139">new</a></li>
160
+ <li><a href="#M000140">read</a></li>
161
+ <li><a href="#M000141">read_scalar</a></li>
162
+ <li><a href="#M000144">recv_io</a></li>
163
+ <li><a href="#M000145">send_io</a></li>
164
+ <li><a href="#M000142">write</a></li>
165
+ <li><a href="#M000143">write_scalar</a></li>
166
166
  </ul>
167
167
 
168
168
 
@@ -186,23 +186,23 @@ The wrapped <a href="../IO.html">IO</a> object.
186
186
  <div class="sectiontitle">Public Class methods</div>
187
187
  <div class="method">
188
188
  <div class="title">
189
- <a name="M000137"></a><b>new</b>(io)
189
+ <a name="M000139"></a><b>new</b>(io)
190
190
  </div>
191
191
  <div class="description">
192
192
  <p>
193
- Create a <a href="MessageChannel.html#M000137">new</a> <a
193
+ Create a <a href="MessageChannel.html#M000139">new</a> <a
194
194
  href="MessageChannel.html">MessageChannel</a> by wrapping the given <a
195
195
  href="../IO.html">IO</a> object.
196
196
  </p>
197
197
  </div>
198
198
  <div class="sourcecode">
199
- <p class="source-link">[ <a href="javascript:toggleSource('M000137_source')" id="l_M000137_source">show source</a> ]</p>
200
- <div id="M000137_source" class="dyn-source">
199
+ <p class="source-link">[ <a href="javascript:toggleSource('M000139_source')" id="l_M000139_source">show source</a> ]</p>
200
+ <div id="M000139_source" class="dyn-source">
201
201
  <pre>
202
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 77</span>
203
- 77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">io</span>)
204
- 78: <span class="ruby-ivar">@io</span> = <span class="ruby-identifier">io</span>
205
- 79: <span class="ruby-keyword kw">end</span>
202
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 82</span>
203
+ 82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">io</span>)
204
+ 83: <span class="ruby-ivar">@io</span> = <span class="ruby-identifier">io</span>
205
+ 84: <span class="ruby-keyword kw">end</span>
206
206
  </pre>
207
207
  </div>
208
208
  </div>
@@ -210,7 +210,7 @@ href="../IO.html">IO</a> object.
210
210
  <div class="sectiontitle">Public Instance methods</div>
211
211
  <div class="method">
212
212
  <div class="title">
213
- <a name="M000145"></a><b>close</b>()
213
+ <a name="M000147"></a><b>close</b>()
214
214
  </div>
215
215
  <div class="description">
216
216
  <p>
@@ -219,20 +219,20 @@ SystemCallError or IOError when something goes wrong.
219
219
  </p>
220
220
  </div>
221
221
  <div class="sourcecode">
222
- <p class="source-link">[ <a href="javascript:toggleSource('M000145_source')" id="l_M000145_source">show source</a> ]</p>
223
- <div id="M000145_source" class="dyn-source">
222
+ <p class="source-link">[ <a href="javascript:toggleSource('M000147_source')" id="l_M000147_source">show source</a> ]</p>
223
+ <div id="M000147_source" class="dyn-source">
224
224
  <pre>
225
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 211</span>
226
- 211: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
227
- 212: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">close</span>
228
- 213: <span class="ruby-keyword kw">end</span>
225
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 216</span>
226
+ 216: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
227
+ 217: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">close</span>
228
+ 218: <span class="ruby-keyword kw">end</span>
229
229
  </pre>
230
230
  </div>
231
231
  </div>
232
232
  </div>
233
233
  <div class="method">
234
234
  <div class="title">
235
- <a name="M000144"></a><b>fileno</b>()
235
+ <a name="M000146"></a><b>fileno</b>()
236
236
  </div>
237
237
  <div class="description">
238
238
  <p>
@@ -241,20 +241,20 @@ object.
241
241
  </p>
242
242
  </div>
243
243
  <div class="sourcecode">
244
- <p class="source-link">[ <a href="javascript:toggleSource('M000144_source')" id="l_M000144_source">show source</a> ]</p>
245
- <div id="M000144_source" class="dyn-source">
244
+ <p class="source-link">[ <a href="javascript:toggleSource('M000146_source')" id="l_M000146_source">show source</a> ]</p>
245
+ <div id="M000146_source" class="dyn-source">
246
246
  <pre>
247
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 205</span>
248
- 205: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fileno</span>
249
- 206: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">fileno</span>
250
- 207: <span class="ruby-keyword kw">end</span>
247
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 210</span>
248
+ 210: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fileno</span>
249
+ 211: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">fileno</span>
250
+ 212: <span class="ruby-keyword kw">end</span>
251
251
  </pre>
252
252
  </div>
253
253
  </div>
254
254
  </div>
255
255
  <div class="method">
256
256
  <div class="title">
257
- <a name="M000138"></a><b>read</b>()
257
+ <a name="M000140"></a><b>read</b>()
258
258
  </div>
259
259
  <div class="description">
260
260
  <p>
@@ -267,52 +267,52 @@ wrong.
267
267
  </p>
268
268
  </div>
269
269
  <div class="sourcecode">
270
- <p class="source-link">[ <a href="javascript:toggleSource('M000138_source')" id="l_M000138_source">show source</a> ]</p>
271
- <div id="M000138_source" class="dyn-source">
270
+ <p class="source-link">[ <a href="javascript:toggleSource('M000140_source')" id="l_M000140_source">show source</a> ]</p>
271
+ <div id="M000140_source" class="dyn-source">
272
272
  <pre>
273
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 87</span>
274
- 87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read</span>
275
- 88: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
276
- 89: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">HEADER_SIZE</span>
277
- 90: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-constant">HEADER_SIZE</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>)
278
- 91: <span class="ruby-keyword kw">end</span>
279
- 92:
280
- 93: <span class="ruby-identifier">chunk_size</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'n'</span>)[<span class="ruby-value">0</span>]
281
- 94: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
282
- 95: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">chunk_size</span>
283
- 96: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">chunk_size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>)
284
- 97: <span class="ruby-keyword kw">end</span>
285
- 98:
286
- 99: <span class="ruby-identifier">message</span> = []
287
- 100: <span class="ruby-identifier">offset</span> = <span class="ruby-value">0</span>
288
- 101: <span class="ruby-identifier">delimiter_pos</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">DELIMITER</span>, <span class="ruby-identifier">offset</span>)
289
- 102: <span class="ruby-keyword kw">while</span> <span class="ruby-operator">!</span><span class="ruby-identifier">delimiter_pos</span>.<span class="ruby-identifier">nil?</span>
290
- 103: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
291
- 104: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&quot;</span>
292
- 105: <span class="ruby-keyword kw">else</span>
293
- 106: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">buffer</span>[<span class="ruby-identifier">offset</span> <span class="ruby-operator">..</span> <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
294
- 107: <span class="ruby-keyword kw">end</span>
295
- 108: <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
296
- 109: <span class="ruby-identifier">delimiter_pos</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">DELIMITER</span>, <span class="ruby-identifier">offset</span>)
297
- 110: <span class="ruby-keyword kw">end</span>
298
- 111: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">message</span>
299
- 112: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
300
- 113: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
301
- 114: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
302
- 115: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
303
- 116: <span class="ruby-keyword kw">end</span>
273
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 92</span>
274
+ 92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read</span>
275
+ 93: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
276
+ 94: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">HEADER_SIZE</span>
277
+ 95: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-constant">HEADER_SIZE</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>)
278
+ 96: <span class="ruby-keyword kw">end</span>
279
+ 97:
280
+ 98: <span class="ruby-identifier">chunk_size</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'n'</span>)[<span class="ruby-value">0</span>]
281
+ 99: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
282
+ 100: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">chunk_size</span>
283
+ 101: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">chunk_size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>)
284
+ 102: <span class="ruby-keyword kw">end</span>
285
+ 103:
286
+ 104: <span class="ruby-identifier">message</span> = []
287
+ 105: <span class="ruby-identifier">offset</span> = <span class="ruby-value">0</span>
288
+ 106: <span class="ruby-identifier">delimiter_pos</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">DELIMITER</span>, <span class="ruby-identifier">offset</span>)
289
+ 107: <span class="ruby-keyword kw">while</span> <span class="ruby-operator">!</span><span class="ruby-identifier">delimiter_pos</span>.<span class="ruby-identifier">nil?</span>
290
+ 108: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
291
+ 109: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&quot;</span>
292
+ 110: <span class="ruby-keyword kw">else</span>
293
+ 111: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">buffer</span>[<span class="ruby-identifier">offset</span> <span class="ruby-operator">..</span> <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
294
+ 112: <span class="ruby-keyword kw">end</span>
295
+ 113: <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
296
+ 114: <span class="ruby-identifier">delimiter_pos</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">DELIMITER</span>, <span class="ruby-identifier">offset</span>)
297
+ 115: <span class="ruby-keyword kw">end</span>
298
+ 116: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">message</span>
299
+ 117: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
300
+ 118: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
301
+ 119: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
302
+ 120: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
303
+ 121: <span class="ruby-keyword kw">end</span>
304
304
  </pre>
305
305
  </div>
306
306
  </div>
307
307
  </div>
308
308
  <div class="method">
309
309
  <div class="title">
310
- <a name="M000139"></a><b>read_scalar</b>(max_size = nil)
310
+ <a name="M000141"></a><b>read_scalar</b>(max_size = nil)
311
311
  </div>
312
312
  <div class="description">
313
313
  <p>
314
314
  Read a scalar message from the underlying <a href="../IO.html">IO</a>
315
- object. Returns the <a href="MessageChannel.html#M000138">read</a> message,
315
+ object. Returns the <a href="MessageChannel.html#M000140">read</a> message,
316
316
  or nil on end-of-stream.
317
317
  </p>
318
318
  <p>
@@ -326,49 +326,49 @@ larger than <tt>max_size</tt>, then a SecurityError will be raised.
326
326
  </p>
327
327
  </div>
328
328
  <div class="sourcecode">
329
- <p class="source-link">[ <a href="javascript:toggleSource('M000139_source')" id="l_M000139_source">show source</a> ]</p>
330
- <div id="M000139_source" class="dyn-source">
329
+ <p class="source-link">[ <a href="javascript:toggleSource('M000141_source')" id="l_M000141_source">show source</a> ]</p>
330
+ <div id="M000141_source" class="dyn-source">
331
331
  <pre>
332
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 127</span>
333
- 127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_scalar</span>(<span class="ruby-identifier">max_size</span> = <span class="ruby-keyword kw">nil</span>)
334
- 128: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
335
- 129: <span class="ruby-identifier">temp</span> = <span class="ruby-value str">''</span>
336
- 130: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">4</span>
337
- 131: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-value">4</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">temp</span>)
338
- 132: <span class="ruby-keyword kw">end</span>
339
- 133: <span class="ruby-identifier">size</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'N'</span>)[<span class="ruby-value">0</span>]
340
- 134: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
341
- 135: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">''</span>
342
- 136: <span class="ruby-keyword kw">else</span>
343
- 137: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">max_size</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">max_size</span>
344
- 138: <span class="ruby-identifier">raise</span> <span class="ruby-constant">SecurityError</span>, <span class="ruby-node">&quot;Scalar message size (#{size}) &quot;</span> <span class="ruby-operator">&lt;&lt;</span>
345
- 139: <span class="ruby-node">&quot;exceeds maximum allowed size (#{max_size}).&quot;</span>
346
- 140: <span class="ruby-keyword kw">end</span>
347
- 141: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
348
- 142: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">size</span>
349
- 143: <span class="ruby-identifier">temp</span> = <span class="ruby-value str">''</span> <span class="ruby-comment cmt"># JRuby doesn't clear the buffer. TODO: remove this when JRuby has been fixed.</span>
350
- 144: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">temp</span>)
332
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 132</span>
333
+ 132: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_scalar</span>(<span class="ruby-identifier">max_size</span> = <span class="ruby-keyword kw">nil</span>)
334
+ 133: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
335
+ 134: <span class="ruby-identifier">temp</span> = <span class="ruby-value str">''</span>
336
+ 135: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">4</span>
337
+ 136: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-value">4</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">temp</span>)
338
+ 137: <span class="ruby-keyword kw">end</span>
339
+ 138: <span class="ruby-identifier">size</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'N'</span>)[<span class="ruby-value">0</span>]
340
+ 139: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
341
+ 140: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">''</span>
342
+ 141: <span class="ruby-keyword kw">else</span>
343
+ 142: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">max_size</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">max_size</span>
344
+ 143: <span class="ruby-identifier">raise</span> <span class="ruby-constant">SecurityError</span>, <span class="ruby-node">&quot;Scalar message size (#{size}) &quot;</span> <span class="ruby-operator">&lt;&lt;</span>
345
+ 144: <span class="ruby-node">&quot;exceeds maximum allowed size (#{max_size}).&quot;</span>
351
346
  145: <span class="ruby-keyword kw">end</span>
352
- 146: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">buffer</span>
353
- 147: <span class="ruby-keyword kw">end</span>
354
- 148: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
355
- 149: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
356
- 150: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
357
- 151: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
358
- 152: <span class="ruby-keyword kw">end</span>
347
+ 146: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
348
+ 147: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">size</span>
349
+ 148: <span class="ruby-identifier">temp</span> = <span class="ruby-value str">''</span> <span class="ruby-comment cmt"># JRuby doesn't clear the buffer. TODO: remove this when JRuby has been fixed.</span>
350
+ 149: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">temp</span>)
351
+ 150: <span class="ruby-keyword kw">end</span>
352
+ 151: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">buffer</span>
353
+ 152: <span class="ruby-keyword kw">end</span>
354
+ 153: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
355
+ 154: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
356
+ 155: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
357
+ 156: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
358
+ 157: <span class="ruby-keyword kw">end</span>
359
359
  </pre>
360
360
  </div>
361
361
  </div>
362
362
  </div>
363
363
  <div class="method">
364
364
  <div class="title">
365
- <a name="M000142"></a><b>recv_io</b>()
365
+ <a name="M000144"></a><b>recv_io</b>()
366
366
  </div>
367
367
  <div class="description">
368
368
  <p>
369
369
  Receive an <a href="../IO.html">IO</a> object (a file descriptor) from the
370
370
  channel. The other side must have sent an <a href="../IO.html">IO</a>
371
- object by calling <a href="MessageChannel.html#M000143">send_io</a>(). Note
371
+ object by calling <a href="MessageChannel.html#M000145">send_io</a>(). Note
372
372
  that this only works on Unix sockets.
373
373
  </p>
374
374
  <p>
@@ -377,26 +377,26 @@ wrong.
377
377
  </p>
378
378
  </div>
379
379
  <div class="sourcecode">
380
- <p class="source-link">[ <a href="javascript:toggleSource('M000142_source')" id="l_M000142_source">show source</a> ]</p>
381
- <div id="M000142_source" class="dyn-source">
380
+ <p class="source-link">[ <a href="javascript:toggleSource('M000144_source')" id="l_M000144_source">show source</a> ]</p>
381
+ <div id="M000144_source" class="dyn-source">
382
382
  <pre>
383
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 190</span>
384
- 190: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recv_io</span>
385
- 191: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">recv_io</span>
386
- 192: <span class="ruby-keyword kw">end</span>
383
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 195</span>
384
+ 195: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recv_io</span>
385
+ 196: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">recv_io</span>
386
+ 197: <span class="ruby-keyword kw">end</span>
387
387
  </pre>
388
388
  </div>
389
389
  </div>
390
390
  </div>
391
391
  <div class="method">
392
392
  <div class="title">
393
- <a name="M000143"></a><b>send_io</b>(io)
393
+ <a name="M000145"></a><b>send_io</b>(io)
394
394
  </div>
395
395
  <div class="description">
396
396
  <p>
397
397
  Send an <a href="../IO.html">IO</a> object (a file descriptor) over the
398
398
  channel. The other side must receive the <a href="../IO.html">IO</a> object
399
- by calling <a href="MessageChannel.html#M000142">recv_io</a>(). Note that
399
+ by calling <a href="MessageChannel.html#M000144">recv_io</a>(). Note that
400
400
  this only works on Unix sockets.
401
401
  </p>
402
402
  <p>
@@ -405,20 +405,20 @@ wrong.
405
405
  </p>
406
406
  </div>
407
407
  <div class="sourcecode">
408
- <p class="source-link">[ <a href="javascript:toggleSource('M000143_source')" id="l_M000143_source">show source</a> ]</p>
409
- <div id="M000143_source" class="dyn-source">
408
+ <p class="source-link">[ <a href="javascript:toggleSource('M000145_source')" id="l_M000145_source">show source</a> ]</p>
409
+ <div id="M000145_source" class="dyn-source">
410
410
  <pre>
411
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 200</span>
412
- 200: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_io</span>(<span class="ruby-identifier">io</span>)
413
- 201: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">send_io</span>(<span class="ruby-identifier">io</span>)
414
- 202: <span class="ruby-keyword kw">end</span>
411
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 205</span>
412
+ 205: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_io</span>(<span class="ruby-identifier">io</span>)
413
+ 206: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">send_io</span>(<span class="ruby-identifier">io</span>)
414
+ 207: <span class="ruby-keyword kw">end</span>
415
415
  </pre>
416
416
  </div>
417
417
  </div>
418
418
  </div>
419
419
  <div class="method">
420
420
  <div class="title">
421
- <a name="M000140"></a><b>write</b>(name, *args)
421
+ <a name="M000142"></a><b>write</b>(name, *args)
422
422
  </div>
423
423
  <div class="description">
424
424
  <p>
@@ -433,30 +433,30 @@ wrong.
433
433
  </p>
434
434
  </div>
435
435
  <div class="sourcecode">
436
- <p class="source-link">[ <a href="javascript:toggleSource('M000140_source')" id="l_M000140_source">show source</a> ]</p>
437
- <div id="M000140_source" class="dyn-source">
436
+ <p class="source-link">[ <a href="javascript:toggleSource('M000142_source')" id="l_M000142_source">show source</a> ]</p>
437
+ <div id="M000142_source" class="dyn-source">
438
438
  <pre>
439
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 161</span>
440
- 161: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
441
- 162: <span class="ruby-identifier">check_argument</span>(<span class="ruby-identifier">name</span>)
442
- 163: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
443
- 164: <span class="ruby-identifier">check_argument</span>(<span class="ruby-identifier">arg</span>)
444
- 165: <span class="ruby-keyword kw">end</span>
445
- 166:
446
- 167: <span class="ruby-identifier">message</span> = <span class="ruby-node">&quot;#{name}#{DELIMITER}&quot;</span>
439
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 166</span>
440
+ 166: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
441
+ 167: <span class="ruby-identifier">check_argument</span>(<span class="ruby-identifier">name</span>)
447
442
  168: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
448
- 169: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">DELIMITER</span>
443
+ 169: <span class="ruby-identifier">check_argument</span>(<span class="ruby-identifier">arg</span>)
449
444
  170: <span class="ruby-keyword kw">end</span>
450
- 171: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">message</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'n'</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">message</span>)
451
- 172: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">flush</span>
452
- 173: <span class="ruby-keyword kw">end</span>
445
+ 171:
446
+ 172: <span class="ruby-identifier">message</span> = <span class="ruby-node">&quot;#{name}#{DELIMITER}&quot;</span>
447
+ 173: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
448
+ 174: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">DELIMITER</span>
449
+ 175: <span class="ruby-keyword kw">end</span>
450
+ 176: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">message</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'n'</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">message</span>)
451
+ 177: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">flush</span>
452
+ 178: <span class="ruby-keyword kw">end</span>
453
453
  </pre>
454
454
  </div>
455
455
  </div>
456
456
  </div>
457
457
  <div class="method">
458
458
  <div class="title">
459
- <a name="M000141"></a><b>write_scalar</b>(data)
459
+ <a name="M000143"></a><b>write_scalar</b>(data)
460
460
  </div>
461
461
  <div class="description">
462
462
  <p>
@@ -469,14 +469,14 @@ wrong.
469
469
  </p>
470
470
  </div>
471
471
  <div class="sourcecode">
472
- <p class="source-link">[ <a href="javascript:toggleSource('M000141_source')" id="l_M000141_source">show source</a> ]</p>
473
- <div id="M000141_source" class="dyn-source">
472
+ <p class="source-link">[ <a href="javascript:toggleSource('M000143_source')" id="l_M000143_source">show source</a> ]</p>
473
+ <div id="M000143_source" class="dyn-source">
474
474
  <pre>
475
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 179</span>
476
- 179: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_scalar</span>(<span class="ruby-identifier">data</span>)
477
- 180: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">data</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'N'</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">data</span>)
478
- 181: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">flush</span>
479
- 182: <span class="ruby-keyword kw">end</span>
475
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 184</span>
476
+ 184: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_scalar</span>(<span class="ruby-identifier">data</span>)
477
+ 185: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">data</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'N'</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">data</span>)
478
+ 186: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">flush</span>
479
+ 187: <span class="ruby-keyword kw">end</span>
480
480
  </pre>
481
481
  </div>
482
482
  </div>