passenger 3.0.4 → 3.0.5

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 (571) hide show
  1. data/NEWS +27 -0
  2. data/build/common_library.rb +4 -0
  3. data/doc/ApplicationPool algorithm.txt +1 -1
  4. data/doc/cxxapi/AbstractSpawnManager_8h_source.html +141 -0
  5. data/doc/cxxapi/Account_8h_source.html +206 -0
  6. data/doc/cxxapi/AccountsDatabase_8h_source.html +161 -0
  7. data/doc/cxxapi/AgentBase_8h_source.html +70 -0
  8. data/doc/cxxapi/AgentsStarter_8h_source.html +112 -0
  9. data/doc/cxxapi/BCrypt_8h_source.html +104 -0
  10. data/doc/cxxapi/Blowfish_8h_source.html +134 -0
  11. data/doc/cxxapi/Bucket_8h_source.html +118 -0
  12. data/doc/cxxapi/Constants_8h_source.html +79 -0
  13. data/doc/cxxapi/ContentHandler_8h_source.html +95 -0
  14. data/doc/cxxapi/DirectoryMapper_8h_source.html +311 -0
  15. data/doc/cxxapi/EventedClient_8h_source.html +733 -0
  16. data/doc/cxxapi/EventedMessageServer_8h_source.html +358 -0
  17. data/doc/cxxapi/EventedServer_8h_source.html +326 -0
  18. data/doc/cxxapi/Exceptions_8h_source.html +393 -0
  19. data/doc/cxxapi/FileDescriptor_8h_source.html +324 -0
  20. data/doc/cxxapi/Hooks_8h_source.html +76 -0
  21. data/doc/cxxapi/HttpStatusExtractor_8h_source.html +382 -0
  22. data/doc/cxxapi/IniFile_8h_source.html +527 -0
  23. data/doc/cxxapi/Logging_8h_source.html +796 -0
  24. data/doc/cxxapi/MessageChannel_8h_source.html +776 -0
  25. data/doc/cxxapi/MessageClient_8h_source.html +328 -0
  26. data/doc/cxxapi/MessageReadersWriters_8h_source.html +539 -0
  27. data/doc/cxxapi/MessageServer_8h_source.html +612 -0
  28. data/doc/cxxapi/PoolOptions_8h_source.html +549 -0
  29. data/doc/cxxapi/Process_8h_source.html +286 -0
  30. data/doc/cxxapi/RandomGenerator_8h_source.html +191 -0
  31. data/doc/cxxapi/ResourceLocator_8h_source.html +166 -0
  32. data/doc/cxxapi/SafeLibev_8h_source.html +180 -0
  33. data/doc/cxxapi/ScgiRequestParser_8h_source.html +406 -0
  34. data/doc/cxxapi/ServerInstanceDir_8h_source.html +378 -0
  35. data/doc/cxxapi/Session_8h_source.html +501 -0
  36. data/doc/cxxapi/SpawnManager_8h_source.html +647 -0
  37. data/doc/cxxapi/StaticContentHandler_8h_source.html +68 -0
  38. data/doc/cxxapi/StaticString_8h_source.html +329 -0
  39. data/doc/cxxapi/StringListCreator_8h_source.html +114 -0
  40. data/doc/cxxapi/Utils_8h_source.html +459 -0
  41. data/doc/cxxapi/annotated.html +87 -0
  42. data/doc/cxxapi/apache2_2Configuration_8h_source.html +82 -0
  43. data/doc/cxxapi/classAgentWatcher-members.html +54 -0
  44. data/doc/cxxapi/classAgentWatcher.html +419 -0
  45. data/doc/cxxapi/classClient-members.html +38 -0
  46. data/doc/cxxapi/classClient.html +123 -0
  47. data/doc/cxxapi/classHooks-members.html +40 -0
  48. data/doc/cxxapi/classHooks.html +153 -0
  49. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager-members.html +40 -0
  50. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager.html +187 -0
  51. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.map +3 -0
  52. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.md5 +1 -0
  53. data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.png +0 -0
  54. data/doc/cxxapi/classPassenger_1_1ArgumentException-members.html +36 -0
  55. data/doc/cxxapi/classPassenger_1_1ArgumentException.html +56 -0
  56. data/doc/cxxapi/classPassenger_1_1ArrayMessage-members.html +37 -0
  57. data/doc/cxxapi/classPassenger_1_1ArrayMessage.html +113 -0
  58. data/doc/cxxapi/classPassenger_1_1BufferedUpload-members.html +38 -0
  59. data/doc/cxxapi/classPassenger_1_1BufferedUpload.html +112 -0
  60. data/doc/cxxapi/classPassenger_1_1BusyException-members.html +36 -0
  61. data/doc/cxxapi/classPassenger_1_1BusyException.html +54 -0
  62. data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +36 -0
  63. data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +51 -0
  64. data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +41 -0
  65. data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +223 -0
  66. data/doc/cxxapi/classPassenger_1_1EOFException-members.html +36 -0
  67. data/doc/cxxapi/classPassenger_1_1EOFException.html +61 -0
  68. data/doc/cxxapi/classPassenger_1_1EOFException__inherit__graph.map +3 -0
  69. data/doc/cxxapi/classPassenger_1_1EOFException__inherit__graph.md5 +1 -0
  70. data/doc/cxxapi/classPassenger_1_1EOFException__inherit__graph.png +0 -0
  71. data/doc/cxxapi/classPassenger_1_1EventFd-members.html +36 -0
  72. data/doc/cxxapi/classPassenger_1_1EventFd.html +52 -0
  73. data/doc/cxxapi/classPassenger_1_1EventedClient-members.html +59 -0
  74. data/doc/cxxapi/classPassenger_1_1EventedClient.html +531 -0
  75. data/doc/cxxapi/classPassenger_1_1EventedMessageServer-members.html +37 -0
  76. data/doc/cxxapi/classPassenger_1_1EventedMessageServer.html +59 -0
  77. data/doc/cxxapi/classPassenger_1_1EventedMessageServer__inherit__graph.map +3 -0
  78. data/doc/cxxapi/classPassenger_1_1EventedMessageServer__inherit__graph.md5 +1 -0
  79. data/doc/cxxapi/classPassenger_1_1EventedMessageServer__inherit__graph.png +0 -0
  80. data/doc/cxxapi/classPassenger_1_1EventedServer-members.html +37 -0
  81. data/doc/cxxapi/classPassenger_1_1EventedServer.html +93 -0
  82. data/doc/cxxapi/classPassenger_1_1EventedServer__inherit__graph.map +3 -0
  83. data/doc/cxxapi/classPassenger_1_1EventedServer__inherit__graph.md5 +1 -0
  84. data/doc/cxxapi/classPassenger_1_1EventedServer__inherit__graph.png +0 -0
  85. data/doc/cxxapi/classPassenger_1_1FileDescriptor-members.html +41 -0
  86. data/doc/cxxapi/classPassenger_1_1FileDescriptor.html +178 -0
  87. data/doc/cxxapi/classPassenger_1_1FileDescriptorPair-members.html +36 -0
  88. data/doc/cxxapi/classPassenger_1_1FileDescriptorPair.html +52 -0
  89. data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +36 -0
  90. data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +58 -0
  91. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.map +3 -0
  92. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.md5 +1 -0
  93. data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.png +0 -0
  94. data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +41 -0
  95. data/doc/cxxapi/classPassenger_1_1FileSystemException.html +66 -0
  96. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.map +3 -0
  97. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.md5 +1 -0
  98. data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.png +0 -0
  99. data/doc/cxxapi/classPassenger_1_1HttpStatusExtractor-members.html +39 -0
  100. data/doc/cxxapi/classPassenger_1_1HttpStatusExtractor.html +128 -0
  101. data/doc/cxxapi/classPassenger_1_1IOException-members.html +36 -0
  102. data/doc/cxxapi/classPassenger_1_1IOException.html +61 -0
  103. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +4 -0
  104. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +1 -0
  105. data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
  106. data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +57 -0
  107. data/doc/cxxapi/classPassenger_1_1MessageChannel.html +839 -0
  108. data/doc/cxxapi/classPassenger_1_1MessageServer-members.html +49 -0
  109. data/doc/cxxapi/classPassenger_1_1MessageServer.html +407 -0
  110. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext-members.html +36 -0
  111. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext.html +58 -0
  112. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext__inherit__graph.map +3 -0
  113. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext__inherit__graph.md5 +1 -0
  114. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext__inherit__graph.png +0 -0
  115. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext-members.html +41 -0
  116. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext.html +165 -0
  117. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext__inherit__graph.map +3 -0
  118. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext__inherit__graph.md5 +1 -0
  119. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext__inherit__graph.png +0 -0
  120. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler-members.html +39 -0
  121. data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler.html +173 -0
  122. data/doc/cxxapi/classPassenger_1_1Process-members.html +44 -0
  123. data/doc/cxxapi/classPassenger_1_1Process.html +290 -0
  124. data/doc/cxxapi/classPassenger_1_1RandomGenerator-members.html +37 -0
  125. data/doc/cxxapi/classPassenger_1_1RandomGenerator.html +79 -0
  126. data/doc/cxxapi/classPassenger_1_1ResourceLocator-members.html +36 -0
  127. data/doc/cxxapi/classPassenger_1_1ResourceLocator.html +51 -0
  128. data/doc/cxxapi/classPassenger_1_1RuntimeException-members.html +36 -0
  129. data/doc/cxxapi/classPassenger_1_1RuntimeException.html +54 -0
  130. data/doc/cxxapi/classPassenger_1_1SafeLibev-members.html +36 -0
  131. data/doc/cxxapi/classPassenger_1_1SafeLibev.html +51 -0
  132. data/doc/cxxapi/classPassenger_1_1ScalarMessage-members.html +37 -0
  133. data/doc/cxxapi/classPassenger_1_1ScalarMessage.html +76 -0
  134. data/doc/cxxapi/classPassenger_1_1ScgiRequestParser-members.html +50 -0
  135. data/doc/cxxapi/classPassenger_1_1ScgiRequestParser.html +285 -0
  136. data/doc/cxxapi/classPassenger_1_1SecurityException-members.html +36 -0
  137. data/doc/cxxapi/classPassenger_1_1SecurityException.html +56 -0
  138. data/doc/cxxapi/classPassenger_1_1Session-members.html +53 -0
  139. data/doc/cxxapi/classPassenger_1_1Session.html +556 -0
  140. data/doc/cxxapi/classPassenger_1_1Session__inherit__graph.map +3 -0
  141. data/doc/cxxapi/classPassenger_1_1Session__inherit__graph.md5 +1 -0
  142. data/doc/cxxapi/classPassenger_1_1Session__inherit__graph.png +0 -0
  143. data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +39 -0
  144. data/doc/cxxapi/classPassenger_1_1SpawnException.html +101 -0
  145. data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +42 -0
  146. data/doc/cxxapi/classPassenger_1_1SpawnManager.html +292 -0
  147. data/doc/cxxapi/classPassenger_1_1SpawnManager__inherit__graph.map +3 -0
  148. data/doc/cxxapi/classPassenger_1_1SpawnManager__inherit__graph.md5 +1 -0
  149. data/doc/cxxapi/classPassenger_1_1SpawnManager__inherit__graph.png +0 -0
  150. data/doc/cxxapi/classPassenger_1_1StandardSession-members.html +54 -0
  151. data/doc/cxxapi/classPassenger_1_1StandardSession.html +394 -0
  152. data/doc/cxxapi/classPassenger_1_1StandardSession__inherit__graph.map +3 -0
  153. data/doc/cxxapi/classPassenger_1_1StandardSession__inherit__graph.md5 +1 -0
  154. data/doc/cxxapi/classPassenger_1_1StandardSession__inherit__graph.png +0 -0
  155. data/doc/cxxapi/classPassenger_1_1StaticString-members.html +36 -0
  156. data/doc/cxxapi/classPassenger_1_1StaticString.html +56 -0
  157. data/doc/cxxapi/classPassenger_1_1SyntaxError-members.html +36 -0
  158. data/doc/cxxapi/classPassenger_1_1SyntaxError.html +54 -0
  159. data/doc/cxxapi/classPassenger_1_1SystemException-members.html +40 -0
  160. data/doc/cxxapi/classPassenger_1_1SystemException.html +155 -0
  161. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +4 -0
  162. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +1 -0
  163. data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
  164. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException-members.html +40 -0
  165. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException.html +61 -0
  166. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.map +3 -0
  167. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.md5 +1 -0
  168. data/doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.png +0 -0
  169. data/doc/cxxapi/classPassenger_1_1TimeoutException-members.html +36 -0
  170. data/doc/cxxapi/classPassenger_1_1TimeoutException.html +54 -0
  171. data/doc/cxxapi/classPassenger_1_1Uint16Message-members.html +36 -0
  172. data/doc/cxxapi/classPassenger_1_1Uint16Message.html +51 -0
  173. data/doc/cxxapi/classPassenger_1_1Uint32Message-members.html +36 -0
  174. data/doc/cxxapi/classPassenger_1_1Uint32Message.html +51 -0
  175. data/doc/cxxapi/classServer-members.html +36 -0
  176. data/doc/cxxapi/classServer.html +49 -0
  177. data/doc/cxxapi/classServerInstanceDirToucher-members.html +36 -0
  178. data/doc/cxxapi/classServerInstanceDirToucher.html +47 -0
  179. data/doc/cxxapi/classes.html +52 -0
  180. data/doc/cxxapi/definitions_8h_source.html +36 -0
  181. data/doc/cxxapi/doxygen.css +532 -0
  182. data/doc/cxxapi/doxygen.png +0 -0
  183. data/doc/cxxapi/files.html +76 -0
  184. data/doc/cxxapi/ftv2blank.png +0 -0
  185. data/doc/cxxapi/ftv2doc.png +0 -0
  186. data/doc/cxxapi/ftv2folderclosed.png +0 -0
  187. data/doc/cxxapi/ftv2folderopen.png +0 -0
  188. data/doc/cxxapi/ftv2lastnode.png +0 -0
  189. data/doc/cxxapi/ftv2link.png +0 -0
  190. data/doc/cxxapi/ftv2mlastnode.png +0 -0
  191. data/doc/cxxapi/ftv2mnode.png +0 -0
  192. data/doc/cxxapi/ftv2node.png +0 -0
  193. data/doc/cxxapi/ftv2plastnode.png +0 -0
  194. data/doc/cxxapi/ftv2pnode.png +0 -0
  195. data/doc/cxxapi/ftv2vertline.png +0 -0
  196. data/doc/cxxapi/functions.html +103 -0
  197. data/doc/cxxapi/functions_0x62.html +82 -0
  198. data/doc/cxxapi/functions_0x63.html +102 -0
  199. data/doc/cxxapi/functions_0x64.html +102 -0
  200. data/doc/cxxapi/functions_0x65.html +88 -0
  201. data/doc/cxxapi/functions_0x66.html +100 -0
  202. data/doc/cxxapi/functions_0x67.html +167 -0
  203. data/doc/cxxapi/functions_0x68.html +88 -0
  204. data/doc/cxxapi/functions_0x69.html +96 -0
  205. data/doc/cxxapi/functions_0x6b.html +80 -0
  206. data/doc/cxxapi/functions_0x6c.html +88 -0
  207. data/doc/cxxapi/functions_0x6d.html +88 -0
  208. data/doc/cxxapi/functions_0x6e.html +86 -0
  209. data/doc/cxxapi/functions_0x6f.html +94 -0
  210. data/doc/cxxapi/functions_0x70.html +94 -0
  211. data/doc/cxxapi/functions_0x72.html +110 -0
  212. data/doc/cxxapi/functions_0x73.html +171 -0
  213. data/doc/cxxapi/functions_0x74.html +85 -0
  214. data/doc/cxxapi/functions_0x75.html +85 -0
  215. data/doc/cxxapi/functions_0x77.html +92 -0
  216. data/doc/cxxapi/functions_0x7e.html +79 -0
  217. data/doc/cxxapi/functions_enum.html +49 -0
  218. data/doc/cxxapi/functions_eval.html +67 -0
  219. data/doc/cxxapi/functions_func.html +531 -0
  220. data/doc/cxxapi/functions_vars.html +278 -0
  221. data/doc/cxxapi/graph_legend.dot +22 -0
  222. data/doc/cxxapi/graph_legend.html +92 -0
  223. data/doc/cxxapi/graph_legend.png +0 -0
  224. data/doc/cxxapi/group__Core.html +46 -0
  225. data/doc/cxxapi/group__Core.map +3 -0
  226. data/doc/cxxapi/group__Core.png +0 -0
  227. data/doc/cxxapi/group__Exceptions.html +53 -0
  228. data/doc/cxxapi/group__Hooks.html +42 -0
  229. data/doc/cxxapi/group__Hooks.map +3 -0
  230. data/doc/cxxapi/group__Hooks.png +0 -0
  231. data/doc/cxxapi/group__Support.html +538 -0
  232. data/doc/cxxapi/hierarchy.html +101 -0
  233. data/doc/cxxapi/index.html +16 -0
  234. data/doc/cxxapi/inherit__graph__0.map +3 -0
  235. data/doc/cxxapi/inherit__graph__0.md5 +1 -0
  236. data/doc/cxxapi/inherit__graph__0.png +0 -0
  237. data/doc/cxxapi/inherit__graph__1.map +3 -0
  238. data/doc/cxxapi/inherit__graph__1.md5 +1 -0
  239. data/doc/cxxapi/inherit__graph__1.png +0 -0
  240. data/doc/cxxapi/inherit__graph__10.map +3 -0
  241. data/doc/cxxapi/inherit__graph__10.md5 +1 -0
  242. data/doc/cxxapi/inherit__graph__10.png +0 -0
  243. data/doc/cxxapi/inherit__graph__11.map +4 -0
  244. data/doc/cxxapi/inherit__graph__11.md5 +1 -0
  245. data/doc/cxxapi/inherit__graph__11.png +0 -0
  246. data/doc/cxxapi/inherit__graph__12.map +3 -0
  247. data/doc/cxxapi/inherit__graph__12.md5 +1 -0
  248. data/doc/cxxapi/inherit__graph__12.png +0 -0
  249. data/doc/cxxapi/inherit__graph__13.map +3 -0
  250. data/doc/cxxapi/inherit__graph__13.md5 +1 -0
  251. data/doc/cxxapi/inherit__graph__13.png +0 -0
  252. data/doc/cxxapi/inherit__graph__14.map +3 -0
  253. data/doc/cxxapi/inherit__graph__14.md5 +1 -0
  254. data/doc/cxxapi/inherit__graph__14.png +0 -0
  255. data/doc/cxxapi/inherit__graph__15.map +3 -0
  256. data/doc/cxxapi/inherit__graph__15.md5 +1 -0
  257. data/doc/cxxapi/inherit__graph__15.png +0 -0
  258. data/doc/cxxapi/inherit__graph__16.map +5 -0
  259. data/doc/cxxapi/inherit__graph__16.md5 +1 -0
  260. data/doc/cxxapi/inherit__graph__16.png +0 -0
  261. data/doc/cxxapi/inherit__graph__17.map +3 -0
  262. data/doc/cxxapi/inherit__graph__17.md5 +1 -0
  263. data/doc/cxxapi/inherit__graph__17.png +0 -0
  264. data/doc/cxxapi/inherit__graph__18.map +3 -0
  265. data/doc/cxxapi/inherit__graph__18.md5 +1 -0
  266. data/doc/cxxapi/inherit__graph__18.png +0 -0
  267. data/doc/cxxapi/inherit__graph__19.map +4 -0
  268. data/doc/cxxapi/inherit__graph__19.md5 +1 -0
  269. data/doc/cxxapi/inherit__graph__19.png +0 -0
  270. data/doc/cxxapi/inherit__graph__2.map +3 -0
  271. data/doc/cxxapi/inherit__graph__2.md5 +1 -0
  272. data/doc/cxxapi/inherit__graph__2.png +0 -0
  273. data/doc/cxxapi/inherit__graph__20.map +3 -0
  274. data/doc/cxxapi/inherit__graph__20.md5 +1 -0
  275. data/doc/cxxapi/inherit__graph__20.png +0 -0
  276. data/doc/cxxapi/inherit__graph__21.map +3 -0
  277. data/doc/cxxapi/inherit__graph__21.md5 +1 -0
  278. data/doc/cxxapi/inherit__graph__21.png +0 -0
  279. data/doc/cxxapi/inherit__graph__22.map +3 -0
  280. data/doc/cxxapi/inherit__graph__22.md5 +1 -0
  281. data/doc/cxxapi/inherit__graph__22.png +0 -0
  282. data/doc/cxxapi/inherit__graph__23.map +3 -0
  283. data/doc/cxxapi/inherit__graph__23.md5 +1 -0
  284. data/doc/cxxapi/inherit__graph__23.png +0 -0
  285. data/doc/cxxapi/inherit__graph__24.map +3 -0
  286. data/doc/cxxapi/inherit__graph__24.md5 +1 -0
  287. data/doc/cxxapi/inherit__graph__24.png +0 -0
  288. data/doc/cxxapi/inherit__graph__25.map +3 -0
  289. data/doc/cxxapi/inherit__graph__25.md5 +1 -0
  290. data/doc/cxxapi/inherit__graph__25.png +0 -0
  291. data/doc/cxxapi/inherit__graph__26.map +3 -0
  292. data/doc/cxxapi/inherit__graph__26.md5 +1 -0
  293. data/doc/cxxapi/inherit__graph__26.png +0 -0
  294. data/doc/cxxapi/inherit__graph__27.map +3 -0
  295. data/doc/cxxapi/inherit__graph__27.md5 +1 -0
  296. data/doc/cxxapi/inherit__graph__27.png +0 -0
  297. data/doc/cxxapi/inherit__graph__28.map +3 -0
  298. data/doc/cxxapi/inherit__graph__28.md5 +1 -0
  299. data/doc/cxxapi/inherit__graph__28.png +0 -0
  300. data/doc/cxxapi/inherit__graph__29.map +3 -0
  301. data/doc/cxxapi/inherit__graph__29.md5 +1 -0
  302. data/doc/cxxapi/inherit__graph__29.png +0 -0
  303. data/doc/cxxapi/inherit__graph__3.map +4 -0
  304. data/doc/cxxapi/inherit__graph__3.md5 +1 -0
  305. data/doc/cxxapi/inherit__graph__3.png +0 -0
  306. data/doc/cxxapi/inherit__graph__30.map +3 -0
  307. data/doc/cxxapi/inherit__graph__30.md5 +1 -0
  308. data/doc/cxxapi/inherit__graph__30.png +0 -0
  309. data/doc/cxxapi/inherit__graph__31.map +4 -0
  310. data/doc/cxxapi/inherit__graph__31.md5 +1 -0
  311. data/doc/cxxapi/inherit__graph__31.png +0 -0
  312. data/doc/cxxapi/inherit__graph__32.map +3 -0
  313. data/doc/cxxapi/inherit__graph__32.md5 +1 -0
  314. data/doc/cxxapi/inherit__graph__32.png +0 -0
  315. data/doc/cxxapi/inherit__graph__33.map +3 -0
  316. data/doc/cxxapi/inherit__graph__33.md5 +1 -0
  317. data/doc/cxxapi/inherit__graph__33.png +0 -0
  318. data/doc/cxxapi/inherit__graph__34.map +3 -0
  319. data/doc/cxxapi/inherit__graph__34.md5 +1 -0
  320. data/doc/cxxapi/inherit__graph__34.png +0 -0
  321. data/doc/cxxapi/inherit__graph__35.map +3 -0
  322. data/doc/cxxapi/inherit__graph__35.md5 +1 -0
  323. data/doc/cxxapi/inherit__graph__35.png +0 -0
  324. data/doc/cxxapi/inherit__graph__36.map +5 -0
  325. data/doc/cxxapi/inherit__graph__36.md5 +1 -0
  326. data/doc/cxxapi/inherit__graph__36.png +0 -0
  327. data/doc/cxxapi/inherit__graph__37.map +3 -0
  328. data/doc/cxxapi/inherit__graph__37.md5 +1 -0
  329. data/doc/cxxapi/inherit__graph__37.png +0 -0
  330. data/doc/cxxapi/inherit__graph__38.map +3 -0
  331. data/doc/cxxapi/inherit__graph__38.md5 +1 -0
  332. data/doc/cxxapi/inherit__graph__38.png +0 -0
  333. data/doc/cxxapi/inherit__graph__39.map +3 -0
  334. data/doc/cxxapi/inherit__graph__39.md5 +1 -0
  335. data/doc/cxxapi/inherit__graph__39.png +0 -0
  336. data/doc/cxxapi/inherit__graph__4.map +3 -0
  337. data/doc/cxxapi/inherit__graph__4.md5 +1 -0
  338. data/doc/cxxapi/inherit__graph__4.png +0 -0
  339. data/doc/cxxapi/inherit__graph__40.map +3 -0
  340. data/doc/cxxapi/inherit__graph__40.md5 +1 -0
  341. data/doc/cxxapi/inherit__graph__40.png +0 -0
  342. data/doc/cxxapi/inherit__graph__41.map +3 -0
  343. data/doc/cxxapi/inherit__graph__41.md5 +1 -0
  344. data/doc/cxxapi/inherit__graph__41.png +0 -0
  345. data/doc/cxxapi/inherit__graph__5.map +3 -0
  346. data/doc/cxxapi/inherit__graph__5.md5 +1 -0
  347. data/doc/cxxapi/inherit__graph__5.png +0 -0
  348. data/doc/cxxapi/inherit__graph__6.map +3 -0
  349. data/doc/cxxapi/inherit__graph__6.md5 +1 -0
  350. data/doc/cxxapi/inherit__graph__6.png +0 -0
  351. data/doc/cxxapi/inherit__graph__7.map +3 -0
  352. data/doc/cxxapi/inherit__graph__7.md5 +1 -0
  353. data/doc/cxxapi/inherit__graph__7.png +0 -0
  354. data/doc/cxxapi/inherit__graph__8.map +3 -0
  355. data/doc/cxxapi/inherit__graph__8.md5 +1 -0
  356. data/doc/cxxapi/inherit__graph__8.png +0 -0
  357. data/doc/cxxapi/inherit__graph__9.map +3 -0
  358. data/doc/cxxapi/inherit__graph__9.md5 +1 -0
  359. data/doc/cxxapi/inherit__graph__9.png +0 -0
  360. data/doc/cxxapi/inherits.html +165 -0
  361. data/doc/cxxapi/main.html +28 -0
  362. data/doc/cxxapi/modules.html +36 -0
  363. data/doc/cxxapi/namespacePassenger.html +553 -0
  364. data/doc/cxxapi/namespacemembers.html +135 -0
  365. data/doc/cxxapi/namespacemembers_enum.html +48 -0
  366. data/doc/cxxapi/namespacemembers_eval.html +57 -0
  367. data/doc/cxxapi/namespacemembers_func.html +111 -0
  368. data/doc/cxxapi/namespacemembers_type.html +54 -0
  369. data/doc/cxxapi/namespaces.html +37 -0
  370. data/doc/cxxapi/nginx_2Configuration_8h_source.html +126 -0
  371. data/doc/cxxapi/ngx__http__passenger__module_8h_source.html +94 -0
  372. data/doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard-members.html +36 -0
  373. data/doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard.html +51 -0
  374. data/doc/cxxapi/structPassenger_1_1PoolOptions-members.html +67 -0
  375. data/doc/cxxapi/structPassenger_1_1PoolOptions.html +647 -0
  376. data/doc/cxxapi/structPassenger_1_1StaticString_1_1Hash-members.html +36 -0
  377. data/doc/cxxapi/structPassenger_1_1StaticString_1_1Hash.html +51 -0
  378. data/doc/cxxapi/tab_b.gif +0 -0
  379. data/doc/cxxapi/tab_l.gif +0 -0
  380. data/doc/cxxapi/tab_r.gif +0 -0
  381. data/doc/cxxapi/tabs.css +105 -0
  382. data/doc/cxxapi/tree.html +249 -0
  383. data/doc/rdoc/classes/ConditionVariable.html +215 -0
  384. data/doc/rdoc/classes/Exception.html +120 -0
  385. data/doc/rdoc/classes/GC.html +113 -0
  386. data/doc/rdoc/classes/IO.html +221 -0
  387. data/doc/rdoc/classes/PhusionPassenger.html +397 -0
  388. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +180 -0
  389. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +647 -0
  390. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +654 -0
  391. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/InvalidPassword.html +92 -0
  392. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +97 -0
  393. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +96 -0
  394. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +97 -0
  395. data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +96 -0
  396. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +619 -0
  397. data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +142 -0
  398. data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats.html +368 -0
  399. data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats/Process.html +231 -0
  400. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance.html +588 -0
  401. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/CorruptedDirectoryError.html +92 -0
  402. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/GenerationsAbsentError.html +92 -0
  403. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Group.html +147 -0
  404. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Process.html +279 -0
  405. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/RoleDeniedError.html +92 -0
  406. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/StaleDirectoryError.html +92 -0
  407. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Stats.html +123 -0
  408. data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/UnsupportedGenerationStructureVersionError.html +92 -0
  409. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger.html +368 -0
  410. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/Lock.html +194 -0
  411. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/Log.html +299 -0
  412. data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/SharedData.html +206 -0
  413. data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +155 -0
  414. data/doc/rdoc/classes/PhusionPassenger/AppProcess.html +367 -0
  415. data/doc/rdoc/classes/PhusionPassenger/ClassicRails.html +95 -0
  416. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner.html +351 -0
  417. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner/Error.html +98 -0
  418. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/CGIFixed.html +200 -0
  419. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner.html +410 -0
  420. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner/Error.html +98 -0
  421. data/doc/rdoc/classes/PhusionPassenger/ClassicRails/RequestHandler.html +156 -0
  422. data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions.html +115 -0
  423. data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions/AnalyticsLogging.html +202 -0
  424. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +172 -0
  425. data/doc/rdoc/classes/PhusionPassenger/DebugLogging.html +273 -0
  426. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +145 -0
  427. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +162 -0
  428. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +141 -0
  429. data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +92 -0
  430. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +673 -0
  431. data/doc/rdoc/classes/PhusionPassenger/MessageChannel/InvalidHashError.html +92 -0
  432. data/doc/rdoc/classes/PhusionPassenger/MessageClient.html +415 -0
  433. data/doc/rdoc/classes/PhusionPassenger/NativeSupportLoader.html +134 -0
  434. data/doc/rdoc/classes/PhusionPassenger/Packaging.html +129 -0
  435. data/doc/rdoc/classes/PhusionPassenger/PlatformInfo.html +1972 -0
  436. data/doc/rdoc/classes/PhusionPassenger/Plugin.html +237 -0
  437. data/doc/rdoc/classes/PhusionPassenger/Rack.html +91 -0
  438. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +312 -0
  439. data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner/Error.html +98 -0
  440. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +218 -0
  441. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions.html +114 -0
  442. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging.html +259 -0
  443. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ACExtension.html +139 -0
  444. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ASBenchmarkableExtension.html +118 -0
  445. data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ExceptionLogger.html +135 -0
  446. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +378 -0
  447. data/doc/rdoc/classes/PhusionPassenger/Standalone.html +111 -0
  448. data/doc/rdoc/classes/PhusionPassenger/Standalone/AppFinder.html +252 -0
  449. data/doc/rdoc/classes/PhusionPassenger/Standalone/Command.html +161 -0
  450. data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile.html +368 -0
  451. data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile/DisallowedContextError.html +132 -0
  452. data/doc/rdoc/classes/PhusionPassenger/Standalone/HelpCommand.html +151 -0
  453. data/doc/rdoc/classes/PhusionPassenger/Standalone/Main.html +189 -0
  454. data/doc/rdoc/classes/PhusionPassenger/Standalone/PackageRuntimeCommand.html +177 -0
  455. data/doc/rdoc/classes/PhusionPassenger/Standalone/RuntimeInstaller.html +341 -0
  456. data/doc/rdoc/classes/PhusionPassenger/Standalone/StartCommand.html +203 -0
  457. data/doc/rdoc/classes/PhusionPassenger/Standalone/StatusCommand.html +156 -0
  458. data/doc/rdoc/classes/PhusionPassenger/Standalone/StopCommand.html +168 -0
  459. data/doc/rdoc/classes/PhusionPassenger/Standalone/Utils.html +86 -0
  460. data/doc/rdoc/classes/PhusionPassenger/Standalone/VersionCommand.html +135 -0
  461. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +125 -0
  462. data/doc/rdoc/classes/PhusionPassenger/Utils.html +1543 -0
  463. data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher.html +204 -0
  464. data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/DirInfo.html +171 -0
  465. data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/FileInfo.html +140 -0
  466. data/doc/rdoc/classes/PhusionPassenger/Utils/HostsFileParser.html +260 -0
  467. data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +194 -0
  468. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput.html +265 -0
  469. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput/Tempfile.html +120 -0
  470. data/doc/rdoc/classes/PhusionPassenger/Utils/UnseekableSocket.html +561 -0
  471. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +140 -0
  472. data/doc/rdoc/classes/PhusionPassenger/WSGI.html +89 -0
  473. data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +182 -0
  474. data/doc/rdoc/classes/Process.html +115 -0
  475. data/doc/rdoc/classes/Signal.html +139 -0
  476. data/doc/rdoc/created.rid +1 -0
  477. data/doc/rdoc/files/DEVELOPERS_TXT.html +280 -0
  478. data/doc/rdoc/files/README.html +157 -0
  479. data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +130 -0
  480. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +135 -0
  481. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +126 -0
  482. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +128 -0
  483. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/memory_stats_rb.html +126 -0
  484. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/server_instance_rb.html +132 -0
  485. data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +122 -0
  486. data/doc/rdoc/files/lib/phusion_passenger/analytics_logger_rb.html +129 -0
  487. data/doc/rdoc/files/lib/phusion_passenger/app_process_rb.html +127 -0
  488. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/application_spawner_rb.html +141 -0
  489. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/cgi_fixed_rb.html +126 -0
  490. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/framework_spawner_rb.html +146 -0
  491. data/doc/rdoc/files/lib/phusion_passenger/classic_rails/request_handler_rb.html +125 -0
  492. data/doc/rdoc/files/lib/phusion_passenger/classic_rails_extensions/init_rb.html +132 -0
  493. data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +126 -0
  494. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +122 -0
  495. data/doc/rdoc/files/lib/phusion_passenger/debug_logging_rb.html +122 -0
  496. data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +147 -0
  497. data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +122 -0
  498. data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +127 -0
  499. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +120 -0
  500. data/doc/rdoc/files/lib/phusion_passenger/message_client_rb.html +127 -0
  501. data/doc/rdoc/files/lib/phusion_passenger/native_support_rb.html +132 -0
  502. data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
  503. data/doc/rdoc/files/lib/phusion_passenger/platform_info/apache_rb.html +127 -0
  504. data/doc/rdoc/files/lib/phusion_passenger/platform_info/binary_compatibility_rb.html +129 -0
  505. data/doc/rdoc/files/lib/phusion_passenger/platform_info/compiler_rb.html +127 -0
  506. data/doc/rdoc/files/lib/phusion_passenger/platform_info/curl_rb.html +126 -0
  507. data/doc/rdoc/files/lib/phusion_passenger/platform_info/documentation_tools_rb.html +126 -0
  508. data/doc/rdoc/files/lib/phusion_passenger/platform_info/linux_rb.html +126 -0
  509. data/doc/rdoc/files/lib/phusion_passenger/platform_info/operating_system_rb.html +127 -0
  510. data/doc/rdoc/files/lib/phusion_passenger/platform_info/ruby_rb.html +128 -0
  511. data/doc/rdoc/files/lib/phusion_passenger/platform_info/zlib_rb.html +126 -0
  512. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +122 -0
  513. data/doc/rdoc/files/lib/phusion_passenger/plugin_rb.html +127 -0
  514. data/doc/rdoc/files/lib/phusion_passenger/public_api_rb.html +127 -0
  515. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +137 -0
  516. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +125 -0
  517. data/doc/rdoc/files/lib/phusion_passenger/rails3_extensions/init_rb.html +127 -0
  518. data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +122 -0
  519. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +160 -0
  520. data/doc/rdoc/files/lib/phusion_passenger/standalone/app_finder_rb.html +127 -0
  521. data/doc/rdoc/files/lib/phusion_passenger/standalone/command_rb.html +136 -0
  522. data/doc/rdoc/files/lib/phusion_passenger/standalone/config_file_rb.html +126 -0
  523. data/doc/rdoc/files/lib/phusion_passenger/standalone/help_command_rb.html +126 -0
  524. data/doc/rdoc/files/lib/phusion_passenger/standalone/main_rb.html +126 -0
  525. data/doc/rdoc/files/lib/phusion_passenger/standalone/package_runtime_command_rb.html +127 -0
  526. data/doc/rdoc/files/lib/phusion_passenger/standalone/runtime_installer_rb.html +133 -0
  527. data/doc/rdoc/files/lib/phusion_passenger/standalone/start_command_rb.html +136 -0
  528. data/doc/rdoc/files/lib/phusion_passenger/standalone/status_command_rb.html +126 -0
  529. data/doc/rdoc/files/lib/phusion_passenger/standalone/stop_command_rb.html +126 -0
  530. data/doc/rdoc/files/lib/phusion_passenger/standalone/utils_rb.html +126 -0
  531. data/doc/rdoc/files/lib/phusion_passenger/standalone/version_command_rb.html +127 -0
  532. data/doc/rdoc/files/lib/phusion_passenger/utils/file_system_watcher_rb.html +126 -0
  533. data/doc/rdoc/files/lib/phusion_passenger/utils/hosts_file_parser_rb.html +120 -0
  534. data/doc/rdoc/files/lib/phusion_passenger/utils/rewindable_input_rb.html +100 -0
  535. data/doc/rdoc/files/lib/phusion_passenger/utils/tmpdir_rb.html +122 -0
  536. data/doc/rdoc/files/lib/phusion_passenger/utils/unseekable_socket_rb.html +126 -0
  537. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +179 -0
  538. data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +132 -0
  539. data/doc/rdoc/fr_class_index.html +139 -0
  540. data/doc/rdoc/fr_file_index.html +108 -0
  541. data/doc/rdoc/fr_method_index.html +439 -0
  542. data/doc/rdoc/index.html +26 -0
  543. data/doc/rdoc/rdoc-style.css +187 -0
  544. data/ext/apache2/Configuration.cpp +6 -6
  545. data/ext/apache2/Configuration.hpp +3 -3
  546. data/ext/apache2/HelperAgent.cpp +1 -1
  547. data/ext/apache2/Hooks.cpp +3 -3
  548. data/ext/common/ApplicationPool/Pool.h +1 -1
  549. data/ext/common/ApplicationPool/Server.h +5 -2
  550. data/ext/common/Constants.h +1 -1
  551. data/ext/common/LoggingAgent/FilterSupport.cpp +66 -0
  552. data/ext/common/LoggingAgent/FilterSupport.h +262 -73
  553. data/ext/common/LoggingAgent/RemoteSender.h +13 -4
  554. data/ext/common/Utils/CachedFileStat.cpp +6 -12
  555. data/ext/common/Utils/CachedFileStat.h +4 -4
  556. data/ext/common/libboost_oxt/aggregate.cpp +10 -0
  557. data/ext/common/libpassenger_common/aggregate.cpp +16 -0
  558. data/ext/nginx/Configuration.c +77 -4
  559. data/ext/nginx/Configuration.h +2 -1
  560. data/ext/nginx/ContentHandler.c +32 -4
  561. data/ext/nginx/HelperAgent.cpp +5 -4
  562. data/ext/nginx/ngx_http_passenger_module.c +6 -6
  563. data/ext/nginx/ngx_http_passenger_module.h +5 -5
  564. data/lib/phusion_passenger.rb +1 -1
  565. data/lib/phusion_passenger/abstract_request_handler.rb +4 -1
  566. data/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ac_base_extension.rb +3 -1
  567. data/lib/phusion_passenger/standalone/runtime_installer.rb +1 -1
  568. data/lib/phusion_passenger/standalone/start_command.rb +6 -0
  569. data/lib/phusion_passenger/templates/standalone/config.erb +1 -1
  570. data/test/cxx/FilterSupportTest.cpp +135 -5
  571. metadata +547 -4
@@ -0,0 +1,26 @@
1
+
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <title>Passenger Ruby API</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ </head>
10
+
11
+ <frameset cols="20%,*">
12
+ <frameset rows="15%,55%,30%">
13
+ <frame src="fr_file_index.html" title="Files" name="Files" />
14
+ <frame src="fr_class_index.html" name="Classes" />
15
+ <frame src="fr_method_index.html" name="Methods" />
16
+ </frameset>
17
+ <frame src="files/README.html" name="docwin" />
18
+ <noframes>
19
+ <body bgcolor="white">
20
+ Click <a href="html/index.html">here</a> for a non-frames
21
+ version of this page.
22
+ </body>
23
+ </noframes>
24
+ </frameset>
25
+
26
+ </html>
@@ -0,0 +1,187 @@
1
+ a {
2
+ color: #00F;
3
+ text-decoration: none;
4
+ }
5
+
6
+ a:hover {
7
+ color: #77F;
8
+ text-decoration: underline;
9
+ }
10
+
11
+ body, td, p {
12
+ font-family: "Bitstream Vera Sans", Verdana, Arial, Helvetica, sans-serif;
13
+ background: #FFF;
14
+ color: #000;
15
+ margin: 0px;
16
+ font-size: small;
17
+ }
18
+
19
+ p {
20
+ margin-top: 0.5em;
21
+ margin-bottom: 0.5em;
22
+ }
23
+
24
+ #content {
25
+ margin: 2em;
26
+ margin-left: 3.5em;
27
+ margin-right: 3.5em;
28
+ }
29
+
30
+ #description p {
31
+ margin-bottom: 0.5em;
32
+ }
33
+
34
+ .sectiontitle {
35
+ margin-top: 1em;
36
+ margin-bottom: 1em;
37
+ padding: 0.5em;
38
+ padding-left: 2em;
39
+ background: #005;
40
+ color: #FFF;
41
+ font-weight: bold;
42
+ }
43
+
44
+ .attr-rw {
45
+ padding-left: 1em;
46
+ padding-right: 1em;
47
+ text-align: center;
48
+ color: #055;
49
+ }
50
+
51
+ .attr-name {
52
+ font-weight: bold;
53
+ }
54
+
55
+ .attr-desc {
56
+ }
57
+
58
+ .attr-value {
59
+ font-family: monospace;
60
+ }
61
+
62
+ .file-title-prefix {
63
+ font-size: large;
64
+ }
65
+
66
+ .file-title {
67
+ font-size: large;
68
+ font-weight: bold;
69
+ background: #005;
70
+ color: #FFF;
71
+ }
72
+
73
+ .banner {
74
+ background: #005;
75
+ color: #FFF;
76
+ border: 1px solid black;
77
+ padding: 1em;
78
+ }
79
+
80
+ .banner td {
81
+ background: transparent;
82
+ color: #FFF;
83
+ }
84
+
85
+ h1 a, h2 a, .sectiontitle a, .banner a {
86
+ color: #FF0;
87
+ }
88
+
89
+ h1 a:hover, h2 a:hover, .sectiontitle a:hover, .banner a:hover {
90
+ color: #FF7;
91
+ }
92
+
93
+ .dyn-source {
94
+ display: none;
95
+ background: #fffde8;
96
+ color: #000;
97
+ border: #ffe0bb dotted 1px;
98
+ margin: 0.5em 2em 0.5em 2em;
99
+ padding: 0.5em;
100
+ }
101
+
102
+ .dyn-source .cmt {
103
+ color: #00F;
104
+ font-style: italic;
105
+ }
106
+
107
+ .dyn-source .kw {
108
+ color: #070;
109
+ font-weight: bold;
110
+ }
111
+
112
+ .method {
113
+ margin-left: 1em;
114
+ margin-right: 1em;
115
+ margin-bottom: 1em;
116
+ }
117
+
118
+ .description pre {
119
+ padding: 0.5em;
120
+ border: #ffe0bb dotted 1px;
121
+ background: #fffde8;
122
+ }
123
+
124
+ .method .title {
125
+ font-family: monospace;
126
+ font-size: large;
127
+ border-bottom: 1px dashed black;
128
+ margin-bottom: 0.3em;
129
+ padding-bottom: 0.1em;
130
+ }
131
+
132
+ .method .description, .method .sourcecode {
133
+ margin-left: 1em;
134
+ }
135
+
136
+ .description p, .sourcecode p {
137
+ margin-bottom: 0.5em;
138
+ }
139
+
140
+ .method .sourcecode p.source-link {
141
+ text-indent: 0em;
142
+ margin-top: 0.5em;
143
+ }
144
+
145
+ .method .aka {
146
+ margin-top: 0.3em;
147
+ margin-left: 1em;
148
+ font-style: italic;
149
+ text-indent: 2em;
150
+ }
151
+
152
+ h1 {
153
+ padding: 1em;
154
+ margin-left: -1.5em;
155
+ font-size: x-large;
156
+ font-weight: bold;
157
+ color: #FFF;
158
+ background: #007;
159
+ }
160
+
161
+ h2 {
162
+ padding: 0.5em 1em 0.5em 1em;
163
+ margin-left: -1.5em;
164
+ font-size: large;
165
+ font-weight: bold;
166
+ color: #FFF;
167
+ background: #009;
168
+ }
169
+
170
+ h3, h4, h5, h6 {
171
+ color: #220088;
172
+ border-bottom: #5522bb solid 1px;
173
+ }
174
+
175
+ .sourcecode > pre {
176
+ padding: 0.5em;
177
+ border: 1px dotted black;
178
+ background: #FFE;
179
+ }
180
+
181
+ dt {
182
+ font-weight: bold
183
+ }
184
+
185
+ dd {
186
+ margin-bottom: 0.7em;
187
+ }
@@ -208,7 +208,7 @@ passenger_config_create_dir(apr_pool_t *p, char *dirspec) {
208
208
  config->restartDir = NULL;
209
209
  config->uploadBufferDir = NULL;
210
210
  config->friendlyErrorPages = DirConfig::UNSET;
211
- config->analytics = DirConfig::UNSET;
211
+ config->unionStationSupport = DirConfig::UNSET;
212
212
  /*************************************/
213
213
  return config;
214
214
  }
@@ -258,7 +258,7 @@ passenger_config_merge_dir(apr_pool_t *p, void *basev, void *addv) {
258
258
  MERGE_THREEWAY_CONFIG(resolveSymlinksInDocRoot);
259
259
  MERGE_THREEWAY_CONFIG(allowEncodedSlashes);
260
260
  MERGE_THREEWAY_CONFIG(friendlyErrorPages);
261
- MERGE_THREEWAY_CONFIG(analytics);
261
+ MERGE_THREEWAY_CONFIG(unionStationSupport);
262
262
  /*************************************/
263
263
  return config;
264
264
  }
@@ -310,7 +310,7 @@ DEFINE_DIR_STR_CONFIG_SETTER(cmd_union_station_key, unionStationKey)
310
310
  DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_resolve_symlinks_in_document_root, resolveSymlinksInDocRoot)
311
311
  DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_allow_encoded_slashes, allowEncodedSlashes)
312
312
  DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_friendly_error_pages, friendlyErrorPages)
313
- DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_analytics, analytics)
313
+ DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_union_station_support, unionStationSupport)
314
314
 
315
315
  static const char *
316
316
  cmd_passenger_spawn_method(cmd_parms *cmd, void *pcfg, const char *arg) {
@@ -644,11 +644,11 @@ const command_rec passenger_commands[] = {
644
644
  NULL,
645
645
  RSRC_CONF,
646
646
  "Prestart the given web applications during startup."),
647
- AP_INIT_TAKE1("PassengerAnalytics",
648
- (Take1Func) cmd_passenger_analytics,
647
+ AP_INIT_FLAG("UnionStationSupport",
648
+ (Take1Func) cmd_union_station_support,
649
649
  NULL,
650
650
  OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
651
- "Whether to enable analytics logging."),
651
+ "Whether to enable logging through Union Station."),
652
652
 
653
653
  /*****************************/
654
654
 
@@ -195,7 +195,7 @@ struct DirConfig {
195
195
  /**
196
196
  * Whether analytics logging should be enabled.
197
197
  */
198
- Threeway analytics;
198
+ Threeway unionStationSupport;
199
199
 
200
200
  /*************************************/
201
201
  /*************************************/
@@ -329,8 +329,8 @@ struct DirConfig {
329
329
  return friendlyErrorPages != DISABLED;
330
330
  }
331
331
 
332
- bool analyticsEnabled() const {
333
- return analytics == ENABLED;
332
+ bool useUnionStation() const {
333
+ return unionStationSupport == ENABLED;
334
334
  }
335
335
 
336
336
  string getUnionStationFilterString() const {
@@ -254,7 +254,7 @@ public:
254
254
  pool->setMaxIdleTime(poolIdleTime);
255
255
 
256
256
  messageServer->addHandler(ptr(new TimerUpdateHandler(exitTimer)));
257
- messageServer->addHandler(ptr(new ApplicationPool::Server(pool)));
257
+ messageServer->addHandler(ptr(new ApplicationPool::Server(pool, analyticsLogger)));
258
258
  messageServer->addHandler(ptr(new BacktracesServer()));
259
259
  messageServer->addHandler(ptr(new ExitHandler(exitEvent)));
260
260
 
@@ -566,7 +566,7 @@ private:
566
566
  UPDATE_TRACE_POINT();
567
567
  try {
568
568
  AnalyticsLogPtr log;
569
- if (config->analyticsEnabled()) {
569
+ if (config->useUnionStation()) {
570
570
  log = analyticsLogger->newTransaction(
571
571
  config->getAppGroupName(appRoot),
572
572
  "requests",
@@ -662,7 +662,7 @@ private:
662
662
  config->getRestartDir(),
663
663
  DEFAULT_BACKEND_ACCOUNT_RIGHTS,
664
664
  false,
665
- config->analyticsEnabled(),
665
+ config->useUnionStation(),
666
666
  log->isNull() ? AnalyticsLogPtr() : log
667
667
  );
668
668
  options.environmentVariables = ptr(new EnvironmentVariablesStringListCreator(r));
@@ -1058,7 +1058,7 @@ private:
1058
1058
  addHeader(headers, env[i].key, env[i].val);
1059
1059
  }
1060
1060
 
1061
- if (config->analyticsEnabled()) {
1061
+ if (config->useUnionStation()) {
1062
1062
  addHeader(headers, "PASSENGER_GROUP_NAME",
1063
1063
  config->getAppGroupName(appRoot).c_str());
1064
1064
  addHeader(headers, "PASSENGER_TXN_ID", log->getTxnId().c_str());
@@ -943,7 +943,7 @@ private:
943
943
  this_thread::restore_syscall_interruption rsi(dsi);
944
944
  newAppGroupCreatable.wait(l);
945
945
  goto beginning_of_function;
946
- } else if (count == max) {
946
+ } else if (count >= max) {
947
947
  processInfo = inactiveApps.front();
948
948
  P_DEBUG("Killing process " << processInfo->process->getPid() <<
949
949
  " because an extra slot is necessary for spawning");
@@ -237,6 +237,8 @@ private:
237
237
  /** The application pool that's being exposed through the socket. */
238
238
  ApplicationPool::Ptr pool;
239
239
 
240
+ AnalyticsLoggerPtr analyticsLogger;
241
+
240
242
 
241
243
  /*********************************************
242
244
  * Message handler methods
@@ -274,7 +276,7 @@ private:
274
276
  commonContext.requireRights(Account::GET);
275
277
 
276
278
  try {
277
- PoolOptions options(args, 1);
279
+ PoolOptions options(args, 1, analyticsLogger);
278
280
  options.environmentVariables = ptr(new EnvironmentVariablesFetcher(
279
281
  commonContext.channel, options));
280
282
  options.initiateSession = false;
@@ -417,8 +419,9 @@ public:
417
419
  *
418
420
  * @param pool The pool to expose.
419
421
  */
420
- Server(ApplicationPool::Ptr pool) {
422
+ Server(const ApplicationPool::Ptr &pool, const AnalyticsLoggerPtr &analyticsLogger = AnalyticsLoggerPtr()) {
421
423
  this->pool = pool;
424
+ this->analyticsLogger = analyticsLogger;
422
425
  }
423
426
 
424
427
  virtual MessageServer::ClientContextPtr newClient(CommonClientContext &commonContext) {
@@ -26,7 +26,7 @@
26
26
  #define _PASSENGER_CONSTANTS_H_
27
27
 
28
28
  /* Don't forget to update lib/phusion_passenger.rb too. */
29
- #define PASSENGER_VERSION "3.0.4"
29
+ #define PASSENGER_VERSION "3.0.5"
30
30
 
31
31
  #define FEEDBACK_FD 3
32
32
 
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Phusion Passenger - http://www.modrails.com/
3
+ * Copyright (c) 2011 Phusion
4
+ *
5
+ * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in
15
+ * all copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ * THE SOFTWARE.
24
+ */
25
+ #include "FilterSupport.h"
26
+ #include <cstring>
27
+ #include <cstdlib>
28
+
29
+ using namespace Passenger;
30
+
31
+ extern "C" {
32
+
33
+ PassengerFilter *
34
+ passenger_filter_create(const char *source, int size, char **error) {
35
+ if (size == -1) {
36
+ size = strlen(source);
37
+ }
38
+ try {
39
+ return (PassengerFilter *) new FilterSupport::Filter(StaticString(source, size));
40
+ } catch (const SyntaxError &e) {
41
+ if (error != NULL) {
42
+ *error = strdup(e.what());
43
+ }
44
+ return NULL;
45
+ }
46
+ }
47
+
48
+ void
49
+ passenger_filter_free(PassengerFilter *filter) {
50
+ delete (FilterSupport::Filter *) filter;
51
+ }
52
+
53
+ char *
54
+ passenger_filter_validate(const char *source, int size) {
55
+ if (size == -1) {
56
+ size = strlen(source);
57
+ }
58
+ try {
59
+ FilterSupport::Filter(StaticString(source, size));
60
+ return NULL;
61
+ } catch (const SyntaxError &e) {
62
+ return strdup(e.what());
63
+ }
64
+ }
65
+
66
+ } // extern "C"
@@ -25,6 +25,8 @@
25
25
  #ifndef _PASSENGER_FILTER_SUPPORT_H_
26
26
  #define _PASSENGER_FILTER_SUPPORT_H_
27
27
 
28
+ #ifdef __cplusplus
29
+
28
30
  #include <boost/shared_ptr.hpp>
29
31
  #include <boost/make_shared.hpp>
30
32
  #include <oxt/tracable_exception.hpp>
@@ -35,6 +37,7 @@
35
37
  #include <cstring>
36
38
 
37
39
  #include <StaticString.h>
40
+ #include <Exceptions.h>
38
41
  #include <Utils/StrIntUtils.h>
39
42
 
40
43
  namespace Passenger {
@@ -66,6 +69,8 @@ public:
66
69
  REGEXP,
67
70
  STRING,
68
71
  INTEGER,
72
+ TRUE_LIT,
73
+ FALSE_LIT,
69
74
  IDENTIFIER,
70
75
  END_OF_DATA
71
76
  };
@@ -126,7 +131,7 @@ private:
126
131
  return data[pos + 1];
127
132
  }
128
133
 
129
- static bool isLiteralChar(char ch) {
134
+ static bool isIdentifierChar(char ch) {
130
135
  return (ch >= 'a' && ch <= 'z')
131
136
  || (ch >= 'A' && ch <= 'Z')
132
137
  || (ch >= '0' && ch <= '9')
@@ -139,7 +144,7 @@ private:
139
144
 
140
145
  Token logToken(const Token &token) const {
141
146
  if (debug) {
142
- printf("Token: %s\n", token.toString().c_str());
147
+ printf("# Token: %s\n", token.toString().c_str());
143
148
  }
144
149
  return token;
145
150
  }
@@ -227,7 +232,7 @@ private:
227
232
  }
228
233
  }
229
234
 
230
- Token matchRegexp() {
235
+ Token matchRegexp(char terminator) {
231
236
  unsigned int start = pos;
232
237
  bool endFound = false;
233
238
 
@@ -244,7 +249,7 @@ private:
244
249
  } else {
245
250
  pos++;
246
251
  }
247
- } else if (ch == '/') {
252
+ } else if (ch == terminator) {
248
253
  pos++;
249
254
  endFound = true;
250
255
  } else {
@@ -274,7 +279,7 @@ private:
274
279
  }
275
280
  }
276
281
 
277
- Token matchString() {
282
+ Token matchString(char terminator) {
278
283
  unsigned int start = pos;
279
284
  bool endFound = false;
280
285
 
@@ -291,7 +296,7 @@ private:
291
296
  } else {
292
297
  pos++;
293
298
  }
294
- } else if (ch == '"') {
299
+ } else if (ch == terminator) {
295
300
  pos++;
296
301
  endFound = true;
297
302
  } else {
@@ -327,12 +332,20 @@ private:
327
332
  ch == '_') {
328
333
  unsigned int start = pos;
329
334
  pos++;
330
- while (pos < data.size() && isLiteralChar(current())) {
335
+ while (pos < data.size() && isIdentifierChar(current())) {
331
336
  pos++;
332
337
  }
333
- return Token(IDENTIFIER, start, pos - start, data.substr(start, pos - start));
338
+
339
+ StaticString val = data.substr(start, pos - start);
340
+ if (val == "true") {
341
+ return Token(TRUE_LIT, start, pos - start, val);
342
+ } else if (val == "false") {
343
+ return Token(FALSE_LIT, start, pos - start, val);
344
+ } else {
345
+ return Token(IDENTIFIER, start, pos - start, val);
346
+ }
334
347
  } else {
335
- raiseSyntaxError();
348
+ raiseSyntaxError("Identifier expected, but got an unknown token");
336
349
  return Token(); // Shut up compiler warning.
337
350
  }
338
351
  }
@@ -370,9 +383,19 @@ public:
370
383
  case ',':
371
384
  return logToken(matchToken(COMMA, 1));
372
385
  case '/':
373
- return logToken(matchRegexp());
386
+ return logToken(matchRegexp('/'));
387
+ case '%':
388
+ expectingAtLeast(3);
389
+ if (memcmp(data.data() + pos, "%r{", 3) != 0) {
390
+ raiseSyntaxError("expected '%r{', but found '" +
391
+ data.substr(pos, 3) + "'");
392
+ }
393
+ pos += 2;
394
+ return logToken(matchRegexp('}'));
374
395
  case '"':
375
- return logToken(matchString());
396
+ return logToken(matchString('"'));
397
+ case '\'':
398
+ return logToken(matchString('\''));
376
399
  case '-':
377
400
  return logToken(matchInteger());
378
401
  default:
@@ -422,6 +445,10 @@ public:
422
445
  return "STRING";
423
446
  case INTEGER:
424
447
  return "INTEGER";
448
+ case TRUE_LIT:
449
+ return "TRUE";
450
+ case FALSE_LIT:
451
+ return "FALSE";
425
452
  case IDENTIFIER:
426
453
  return "IDENTIFIER";
427
454
  case END_OF_DATA:
@@ -437,6 +464,7 @@ enum ValueType {
437
464
  REGEXP_TYPE,
438
465
  STRING_TYPE,
439
466
  INTEGER_TYPE,
467
+ BOOLEAN_TYPE,
440
468
  UNKNOWN_TYPE
441
469
  };
442
470
 
@@ -449,6 +477,8 @@ public:
449
477
  RESPONSE_TIME
450
478
  };
451
479
 
480
+ virtual ~Context() { }
481
+
452
482
  virtual string getURI() const = 0;
453
483
  virtual string getController() const = 0;
454
484
  virtual int getResponseTime() const = 0;
@@ -476,6 +506,19 @@ public:
476
506
  }
477
507
  }
478
508
 
509
+ bool queryBoolField(FieldIdentifier id) const {
510
+ switch (id) {
511
+ case URI:
512
+ return !getURI().empty();
513
+ case CONTROLLER:
514
+ return !getController().empty();
515
+ case RESPONSE_TIME:
516
+ return getResponseTime() > 0;
517
+ default:
518
+ return false;
519
+ }
520
+ }
521
+
479
522
  static ValueType getFieldType(FieldIdentifier id) {
480
523
  switch (id) {
481
524
  case URI:
@@ -700,6 +743,7 @@ private:
700
743
  typedef shared_ptr<FunctionCall> FunctionCallPtr;
701
744
 
702
745
  struct BooleanComponent {
746
+ virtual ~BooleanComponent() { }
703
747
  virtual bool evaluate(const Context &ctx) = 0;
704
748
  };
705
749
 
@@ -716,7 +760,8 @@ private:
716
760
  GREATER_THAN,
717
761
  GREATER_THAN_OR_EQUALS,
718
762
  LESS_THAN,
719
- LESS_THAN_OR_EQUALS
763
+ LESS_THAN_OR_EQUALS,
764
+ UNKNOWN_COMPARATOR
720
765
  };
721
766
 
722
767
  struct MultiExpression: public BooleanComponent {
@@ -730,16 +775,21 @@ private:
730
775
 
731
776
  virtual bool evaluate(const Context &ctx) {
732
777
  bool result = firstExpression->evaluate(ctx);
733
- vector<Part>::iterator it = rest.begin(), end = rest.end();
734
- while (it != end && result) {
735
- Part &part = *it;
736
- if (part.theOperator == AND) {
737
- result = result && part.expression->evaluate(ctx);
778
+ unsigned int i = 0;
779
+ bool done = i == rest.size();
780
+
781
+ while (!done) {
782
+ Part &nextPart = rest[i];
783
+ if (nextPart.theOperator == AND) {
784
+ result = result && nextPart.expression->evaluate(ctx);
785
+ done = !result;
738
786
  } else {
739
- result = result || part.expression->evaluate(ctx);
787
+ result = result || nextPart.expression->evaluate(ctx);
740
788
  }
741
- it++;
789
+ i++;
790
+ done = done || i == rest.size();
742
791
  }
792
+
743
793
  return result;
744
794
  }
745
795
  };
@@ -761,6 +811,7 @@ private:
761
811
  REGEXP_LITERAL,
762
812
  STRING_LITERAL,
763
813
  INTEGER_LITERAL,
814
+ BOOLEAN_LITERAL,
764
815
  CONTEXT_FIELD_IDENTIFIER
765
816
  };
766
817
 
@@ -774,6 +825,7 @@ private:
774
825
  } regexp;
775
826
  } stringOrRegexpValue;
776
827
  int intValue;
828
+ bool boolValue;
777
829
  Context::FieldIdentifier contextFieldIdentifier;
778
830
  } u;
779
831
 
@@ -795,6 +847,7 @@ private:
795
847
  new (u.stringOrRegexpValue.stringStorage) string(value.data(), value.size());
796
848
  if (regexp) {
797
849
  int options = REG_EXTENDED;
850
+ u.stringOrRegexpValue.regexp.options = 0;
798
851
  if (caseInsensitive) {
799
852
  options |= REG_ICASE;
800
853
  u.stringOrRegexpValue.regexp.options |=
@@ -811,6 +864,11 @@ private:
811
864
  u.intValue = val;
812
865
  }
813
866
 
867
+ Value(bool val) {
868
+ source = BOOLEAN_LITERAL;
869
+ u.boolValue = val;
870
+ }
871
+
814
872
  Value(Context::FieldIdentifier identifier) {
815
873
  source = CONTEXT_FIELD_IDENTIFIER;
816
874
  u.contextFieldIdentifier = identifier;
@@ -841,6 +899,12 @@ private:
841
899
  return storedString();
842
900
  case INTEGER_LITERAL:
843
901
  return toString(u.intValue);
902
+ case BOOLEAN_LITERAL:
903
+ if (u.boolValue) {
904
+ return "true";
905
+ } else {
906
+ return "false";
907
+ }
844
908
  case CONTEXT_FIELD_IDENTIFIER:
845
909
  return ctx.queryStringField(u.contextFieldIdentifier);
846
910
  default:
@@ -856,6 +920,8 @@ private:
856
920
  return atoi(storedString());
857
921
  case INTEGER_LITERAL:
858
922
  return u.intValue;
923
+ case BOOLEAN_LITERAL:
924
+ return (int) u.boolValue;
859
925
  case CONTEXT_FIELD_IDENTIFIER:
860
926
  return ctx.queryIntField(u.contextFieldIdentifier);
861
927
  default:
@@ -863,6 +929,23 @@ private:
863
929
  }
864
930
  }
865
931
 
932
+ bool getBooleanValue(const Context &ctx) const {
933
+ switch (source) {
934
+ case REGEXP_LITERAL:
935
+ return true;
936
+ case STRING_LITERAL:
937
+ return !storedString().empty();
938
+ case INTEGER_LITERAL:
939
+ return (bool) u.intValue;
940
+ case BOOLEAN_LITERAL:
941
+ return u.boolValue;
942
+ case CONTEXT_FIELD_IDENTIFIER:
943
+ return ctx.queryBoolField(u.contextFieldIdentifier);
944
+ default:
945
+ return 0;
946
+ }
947
+ }
948
+
866
949
  ValueType getType() const {
867
950
  switch (source) {
868
951
  case REGEXP_LITERAL:
@@ -871,6 +954,8 @@ private:
871
954
  return STRING_TYPE;
872
955
  case INTEGER_LITERAL:
873
956
  return INTEGER_TYPE;
957
+ case BOOLEAN_LITERAL:
958
+ return BOOLEAN_TYPE;
874
959
  case CONTEXT_FIELD_IDENTIFIER:
875
960
  return Context::getFieldType(u.contextFieldIdentifier);
876
961
  default:
@@ -917,6 +1002,9 @@ private:
917
1002
  case INTEGER_LITERAL:
918
1003
  u.intValue = other.u.intValue;
919
1004
  break;
1005
+ case BOOLEAN_LITERAL:
1006
+ u.boolValue = other.u.boolValue;
1007
+ break;
920
1008
  case CONTEXT_FIELD_IDENTIFIER:
921
1009
  u.contextFieldIdentifier = other.u.contextFieldIdentifier;
922
1010
  break;
@@ -924,6 +1012,18 @@ private:
924
1012
  }
925
1013
  };
926
1014
 
1015
+ struct SingleValueComponent: public BooleanComponent {
1016
+ Value val;
1017
+
1018
+ SingleValueComponent(const Value &v)
1019
+ : val(v)
1020
+ { }
1021
+
1022
+ virtual bool evaluate(const Context &ctx) {
1023
+ return val.getBooleanValue(ctx);
1024
+ }
1025
+ };
1026
+
927
1027
  struct Comparison: public BooleanComponent {
928
1028
  Value subject;
929
1029
  Comparator comparator;
@@ -935,6 +1035,8 @@ private:
935
1035
  return compareStringOrRegexp(subject.getStringValue(ctx), ctx);
936
1036
  case INTEGER_TYPE:
937
1037
  return compareInteger(subject.getIntegerValue(ctx), ctx);
1038
+ case BOOLEAN_TYPE:
1039
+ return compareBoolean(subject.getBooleanValue(ctx), ctx);
938
1040
  default:
939
1041
  // error
940
1042
  return false;
@@ -978,6 +1080,19 @@ private:
978
1080
  return false;
979
1081
  }
980
1082
  }
1083
+
1084
+ bool compareBoolean(bool value, const Context &ctx) {
1085
+ bool value2 = object.getBooleanValue(ctx);
1086
+ switch (comparator) {
1087
+ case EQUALS:
1088
+ return value == value2;
1089
+ case NOT_EQUALS:
1090
+ return value != value2;
1091
+ default:
1092
+ // error
1093
+ return false;
1094
+ }
1095
+ }
981
1096
  };
982
1097
 
983
1098
  struct FunctionCall: public BooleanComponent {
@@ -1016,11 +1131,14 @@ private:
1016
1131
  Tokenizer tokenizer;
1017
1132
  BooleanComponentPtr root;
1018
1133
  Token lookahead;
1134
+ bool debug;
1019
1135
 
1020
1136
  static bool isLiteralToken(const Token &token) {
1021
1137
  return token.type == Tokenizer::REGEXP
1022
1138
  || token.type == Tokenizer::STRING
1023
- || token.type == Tokenizer::INTEGER;
1139
+ || token.type == Tokenizer::INTEGER
1140
+ || token.type == Tokenizer::TRUE_LIT
1141
+ || token.type == Tokenizer::FALSE_LIT;
1024
1142
  }
1025
1143
 
1026
1144
  static bool isValueToken(const Token &token) {
@@ -1032,6 +1150,29 @@ private:
1032
1150
  || token.type == Tokenizer::OR;
1033
1151
  }
1034
1152
 
1153
+ static Comparator determineComparator(Tokenizer::TokenType type) {
1154
+ switch (type) {
1155
+ case Tokenizer::MATCHES:
1156
+ return MATCHES;
1157
+ case Tokenizer::NOT_MATCHES:
1158
+ return NOT_MATCHES;
1159
+ case Tokenizer::EQUALS:
1160
+ return EQUALS;
1161
+ case Tokenizer::NOT_EQUALS:
1162
+ return NOT_EQUALS;
1163
+ case Tokenizer::GREATER_THAN:
1164
+ return GREATER_THAN;
1165
+ case Tokenizer::GREATER_THAN_OR_EQUALS:
1166
+ return GREATER_THAN_OR_EQUALS;
1167
+ case Tokenizer::LESS_THAN:
1168
+ return LESS_THAN;
1169
+ case Tokenizer::LESS_THAN_OR_EQUALS:
1170
+ return LESS_THAN_OR_EQUALS;
1171
+ default:
1172
+ return UNKNOWN_COMPARATOR;
1173
+ }
1174
+ }
1175
+
1035
1176
  static bool comparatorAcceptsValueTypes(Comparator cmp, ValueType subjectType, ValueType objectType) {
1036
1177
  switch (cmp) {
1037
1178
  case MATCHES:
@@ -1039,7 +1180,7 @@ private:
1039
1180
  return subjectType == STRING_TYPE && objectType == REGEXP_TYPE;
1040
1181
  case EQUALS:
1041
1182
  case NOT_EQUALS:
1042
- return (subjectType == STRING_TYPE || subjectType == INTEGER_TYPE)
1183
+ return (subjectType == STRING_TYPE || subjectType == INTEGER_TYPE || subjectType == BOOLEAN_TYPE)
1043
1184
  && subjectType == objectType;
1044
1185
  case GREATER_THAN:
1045
1186
  case GREATER_THAN_OR_EQUALS:
@@ -1089,6 +1230,19 @@ private:
1089
1230
  return result;
1090
1231
  }
1091
1232
 
1233
+ void logMatch(int level, const char *name) const {
1234
+ if (level > 100) {
1235
+ // If level is too deep then it's probably a bug.
1236
+ abort();
1237
+ }
1238
+ if (debug) {
1239
+ for (int i = 0; i < level; i++) {
1240
+ printf(" ");
1241
+ }
1242
+ printf("Matching: %s\n", name);
1243
+ }
1244
+ }
1245
+
1092
1246
  Token peek() const {
1093
1247
  return lookahead;
1094
1248
  }
@@ -1127,21 +1281,23 @@ private:
1127
1281
  }
1128
1282
  }
1129
1283
 
1130
- BooleanComponentPtr matchMultiExpression() {
1284
+ BooleanComponentPtr matchMultiExpression(int level) {
1285
+ logMatch(level, "matchMultiExpression()");
1131
1286
  MultiExpressionPtr result = make_shared<MultiExpression>();
1132
1287
 
1133
- result->firstExpression = matchExpression();
1288
+ result->firstExpression = matchExpression(level + 1);
1134
1289
  while (isLogicalOperatorToken(peek())) {
1135
1290
  MultiExpression::Part part;
1136
- part.theOperator = matchOperator();
1137
- part.expression = matchExpression();
1291
+ part.theOperator = matchOperator(level + 1);
1292
+ part.expression = matchExpression(level + 1);
1138
1293
  result->rest.push_back(part);
1139
1294
  }
1140
1295
 
1141
1296
  return result;
1142
1297
  }
1143
1298
 
1144
- BooleanComponentPtr matchExpression() {
1299
+ BooleanComponentPtr matchExpression(int level) {
1300
+ logMatch(level, "matchExpression()");
1145
1301
  bool negate = false;
1146
1302
 
1147
1303
  if (peek(Tokenizer::NOT)) {
@@ -1151,7 +1307,8 @@ private:
1151
1307
 
1152
1308
  Token next = peek();
1153
1309
  if (next.type == Tokenizer::LPARENTHESIS) {
1154
- BooleanComponentPtr expression = matchMultiExpression();
1310
+ match();
1311
+ BooleanComponentPtr expression = matchMultiExpression(level + 1);
1155
1312
  match(Tokenizer::RPARENTHESIS);
1156
1313
  if (negate) {
1157
1314
  return make_shared<Negation>(expression);
@@ -1160,12 +1317,17 @@ private:
1160
1317
  }
1161
1318
  } else if (isValueToken(next)) {
1162
1319
  BooleanComponentPtr component;
1163
- next = match();
1320
+ Token &current = next;
1321
+ match();
1164
1322
 
1165
1323
  if (peek(Tokenizer::LPARENTHESIS)) {
1166
- component = matchFunctionCall(next);
1324
+ component = matchFunctionCall(level + 1, current);
1325
+ } else if (determineComparator(peek().type) != UNKNOWN_COMPARATOR) {
1326
+ component = matchComparison(level + 1, current);
1327
+ } else if (current.type == Tokenizer::TRUE_LIT || current.type == Tokenizer::FALSE_LIT) {
1328
+ component = matchSingleValueComponent(level + 1, current);
1167
1329
  } else {
1168
- component = matchComparison(next);
1330
+ raiseSyntaxError("expected a function call, comparison or boolean literal", current);
1169
1331
  }
1170
1332
 
1171
1333
  if (negate) {
@@ -1179,18 +1341,25 @@ private:
1179
1341
  }
1180
1342
  }
1181
1343
 
1182
- ComparisonPtr matchComparison(const Token &subjectToken) {
1344
+ BooleanComponentPtr matchSingleValueComponent(int level, const Token &token) {
1345
+ logMatch(level, "matchSingleValueComponent()");
1346
+ return make_shared<SingleValueComponent>(matchLiteral(level + 1, token));
1347
+ }
1348
+
1349
+ ComparisonPtr matchComparison(int level, const Token &subjectToken) {
1350
+ logMatch(level, "matchComparison()");
1183
1351
  ComparisonPtr comparison = make_shared<Comparison>();
1184
- comparison->subject = matchValue(subjectToken);
1185
- comparison->comparator = matchComparator();
1186
- comparison->object = matchValue(match());
1352
+ comparison->subject = matchValue(level + 1, subjectToken);
1353
+ comparison->comparator = matchComparator(level + 1);
1354
+ comparison->object = matchValue(level + 1, match());
1187
1355
  if (!comparatorAcceptsValueTypes(comparison->comparator, comparison->subject.getType(), comparison->object.getType())) {
1188
1356
  raiseSyntaxError("the comparator cannot operate on the given combination of types", subjectToken);
1189
1357
  }
1190
1358
  return comparison;
1191
1359
  }
1192
1360
 
1193
- FunctionCallPtr matchFunctionCall(const Token &id) {
1361
+ FunctionCallPtr matchFunctionCall(int level, const Token &id) {
1362
+ logMatch(level, "matchFunctionCall()");
1194
1363
  FunctionCallPtr function;
1195
1364
 
1196
1365
  if (id.rawValue == "starts_with") {
@@ -1203,10 +1372,10 @@ private:
1203
1372
 
1204
1373
  match(Tokenizer::LPARENTHESIS);
1205
1374
  if (isValueToken(peek())) {
1206
- function->arguments.push_back(matchValue(match()));
1375
+ function->arguments.push_back(matchValue(level + 1, match()));
1207
1376
  while (peek(Tokenizer::COMMA)) {
1208
1377
  match();
1209
- function->arguments.push_back(matchValue(match()));
1378
+ function->arguments.push_back(matchValue(level + 1, match()));
1210
1379
  }
1211
1380
  }
1212
1381
  match(Tokenizer::RPARENTHESIS);
@@ -1214,22 +1383,27 @@ private:
1214
1383
  return function;
1215
1384
  }
1216
1385
 
1217
- Value matchValue(const Token &token) {
1386
+ Value matchValue(int level, const Token &token) {
1387
+ logMatch(level, "matchValue()");
1218
1388
  if (isLiteralToken(token)) {
1219
- return matchLiteral(token);
1389
+ return matchLiteral(level + 1, token);
1220
1390
  } else if (token.type == Tokenizer::IDENTIFIER) {
1221
- return matchContextFieldIdentifier(token);
1391
+ return matchContextFieldIdentifier(level + 1, token);
1222
1392
  } else {
1223
- raiseSyntaxError("", token);
1393
+ raiseSyntaxError("Unrecognized value token " +
1394
+ Tokenizer::typeToString(token.type), token);
1224
1395
  return Value(); // Shut up compiler warning.
1225
1396
  }
1226
1397
  }
1227
1398
 
1228
- LogicalOperator matchOperator() {
1399
+ LogicalOperator matchOperator(int level) {
1400
+ logMatch(level, "matchOperator()");
1229
1401
  if (peek(Tokenizer::AND)) {
1402
+ logMatch(level + 1, "AND");
1230
1403
  match();
1231
1404
  return AND;
1232
1405
  } else if (peek(Tokenizer::OR)) {
1406
+ logMatch(level + 1, "OR");
1233
1407
  match();
1234
1408
  return OR;
1235
1409
  } else {
@@ -1238,52 +1412,45 @@ private:
1238
1412
  }
1239
1413
  }
1240
1414
 
1241
- Comparator matchComparator() {
1242
- if (peek(Tokenizer::MATCHES)) {
1243
- match();
1244
- return MATCHES;
1245
- } else if (peek(Tokenizer::NOT_MATCHES)) {
1246
- match();
1247
- return NOT_MATCHES;
1248
- } else if (peek(Tokenizer::EQUALS)) {
1249
- match();
1250
- return EQUALS;
1251
- } else if (peek(Tokenizer::NOT_EQUALS)) {
1252
- match();
1253
- return NOT_EQUALS;
1254
- } else if (peek(Tokenizer::GREATER_THAN)) {
1255
- match();
1256
- return GREATER_THAN;
1257
- } else if (peek(Tokenizer::GREATER_THAN_OR_EQUALS)) {
1258
- match();
1259
- return GREATER_THAN_OR_EQUALS;
1260
- } else if (peek(Tokenizer::LESS_THAN)) {
1261
- match();
1262
- return LESS_THAN;
1263
- } else if (peek(Tokenizer::LESS_THAN_OR_EQUALS)) {
1264
- match();
1265
- return LESS_THAN_OR_EQUALS;
1266
- } else {
1415
+ Comparator matchComparator(int level) {
1416
+ logMatch(level, "matchComparator()");
1417
+ Comparator comparator = determineComparator(peek().type);
1418
+ if (comparator == UNKNOWN_COMPARATOR) {
1267
1419
  raiseSyntaxError("", peek());
1268
1420
  return MATCHES; // Shut up compiler warning.
1421
+ } else {
1422
+ logMatch(level + 1, Tokenizer::typeToString(peek().type).c_str());
1423
+ match();
1424
+ return comparator;
1269
1425
  }
1270
1426
  }
1271
1427
 
1272
- Value matchLiteral(const Token &token) {
1428
+ Value matchLiteral(int level, const Token &token) {
1429
+ logMatch(level, "matchLiteral()");
1273
1430
  if (token.type == Tokenizer::REGEXP) {
1431
+ logMatch(level + 1, "regexp");
1274
1432
  return Value(true, unescapeCString(token.rawValue.substr(1, token.rawValue.size() - 2)),
1275
1433
  token.options & Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE);
1276
1434
  } else if (token.type == Tokenizer::STRING) {
1435
+ logMatch(level + 1, "string");
1277
1436
  return Value(false, unescapeCString(token.rawValue.substr(1, token.rawValue.size() - 2)));
1278
1437
  } else if (token.type == Tokenizer::INTEGER) {
1438
+ logMatch(level + 1, "integer");
1279
1439
  return Value(atoi(token.rawValue.toString()));
1440
+ } else if (token.type == Tokenizer::TRUE_LIT) {
1441
+ logMatch(level + 1, "true");
1442
+ return Value(true);
1443
+ } else if (token.type == Tokenizer::FALSE_LIT) {
1444
+ logMatch(level + 1, "false");
1445
+ return Value(false);
1280
1446
  } else {
1281
- raiseSyntaxError("regular expression, string or integer expected", token);
1447
+ raiseSyntaxError("regular expression, string, integer or boolean expected", token);
1282
1448
  return Value(); // Shut up compiler warning.
1283
1449
  }
1284
1450
  }
1285
1451
 
1286
- Value matchContextFieldIdentifier(const Token &token) {
1452
+ Value matchContextFieldIdentifier(int level, const Token &token) {
1453
+ logMatch(level, "matchContextFieldIdentifier()");
1287
1454
  if (token.rawValue == "uri") {
1288
1455
  return Value(Context::URI);
1289
1456
  } else if (token.rawValue == "controller") {
@@ -1295,13 +1462,15 @@ private:
1295
1462
  return Value(); // Shut up compiler warning.
1296
1463
  }
1297
1464
  }
1298
-
1465
+
1299
1466
  public:
1300
1467
  Filter(const StaticString &source, bool debug = false)
1301
1468
  : tokenizer(source, debug)
1302
1469
  {
1470
+ this->debug = debug;
1303
1471
  lookahead = tokenizer.getNext();
1304
- root = matchMultiExpression();
1472
+ root = matchMultiExpression(0);
1473
+ logMatch(0, "end of data");
1305
1474
  match(Tokenizer::END_OF_DATA);
1306
1475
  }
1307
1476
 
@@ -1314,4 +1483,24 @@ public:
1314
1483
  } // namespace FilterSupport
1315
1484
  } // namespace Passenger
1316
1485
 
1486
+ #endif /* __cplusplus */
1487
+
1488
+
1489
+ /********* C bindings *********/
1490
+
1491
+ #ifdef __cplusplus
1492
+ extern "C" {
1493
+ #endif
1494
+
1495
+ typedef void *PassengerFilter;
1496
+
1497
+ PassengerFilter *passenger_filter_create(const char *source, int size, char **error);
1498
+ void passenger_filter_free(PassengerFilter *filter);
1499
+ char *passenger_filter_validate(const char *source, int size);
1500
+
1501
+ #ifdef __cplusplus
1502
+ }
1503
+ #endif
1504
+
1505
+
1317
1506
  #endif /* _PASSENGER_FILTER_SUPPORT_H_ */