passenger 5.3.4 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (283) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +69 -0
  3. data/CONTRIBUTORS +1 -0
  4. data/README.md +2 -1
  5. data/Rakefile +0 -5
  6. data/build/agent.rb +6 -3
  7. data/build/cxx_tests.rb +28 -19
  8. data/build/integration_tests.rb +6 -2
  9. data/build/misc.rb +2 -1
  10. data/build/packaging.rb +2 -0
  11. data/build/support/cplusplus.rb +2 -2
  12. data/build/support/cxx_dependency_map.rb +2651 -2189
  13. data/dev/colorize-logs +272 -0
  14. data/dev/show-latest-crashlog-dir +27 -0
  15. data/resources/templates/standalone/http.erb +2 -0
  16. data/resources/templates/standalone/server.erb +1 -0
  17. data/src/agent/AgentMain.cpp +4 -0
  18. data/src/agent/Core/AdminPanelConnector.h +6 -6
  19. data/src/agent/Core/ApiServer.h +4 -4
  20. data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +2 -2
  21. data/src/agent/Core/ApplicationPool/Context.h +5 -1
  22. data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +2 -2
  23. data/src/agent/Core/ApplicationPool/Group/LifetimeAndBasics.cpp +5 -0
  24. data/src/agent/Core/ApplicationPool/Group/Miscellaneous.cpp +2 -1
  25. data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +3 -3
  26. data/src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +1 -1
  27. data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +13 -20
  28. data/src/agent/Core/ApplicationPool/Group.h +4 -2
  29. data/src/agent/Core/ApplicationPool/Implementation.cpp +5 -5
  30. data/src/agent/Core/ApplicationPool/Options.h +42 -38
  31. data/src/agent/Core/ApplicationPool/Pool/GroupUtils.cpp +2 -1
  32. data/src/agent/Core/ApplicationPool/Pool.h +4 -4
  33. data/src/agent/Core/ApplicationPool/Process.h +13 -15
  34. data/src/agent/Core/ApplicationPool/Socket.h +5 -5
  35. data/src/agent/Core/ApplicationPool/TestSession.h +3 -3
  36. data/src/agent/Core/Config.h +50 -10
  37. data/src/agent/Core/ConfigChange.cpp +13 -1
  38. data/src/agent/Core/Controller/Config.h +41 -17
  39. data/src/agent/Core/Controller/ForwardResponse.cpp +4 -0
  40. data/src/agent/Core/Controller/InitRequest.cpp +14 -8
  41. data/src/agent/Core/Controller/InitializationAndShutdown.cpp +5 -0
  42. data/src/agent/Core/Controller/SendRequest.cpp +9 -9
  43. data/src/agent/Core/Controller/TurboCaching.h +2 -2
  44. data/src/agent/Core/Controller.h +7 -5
  45. data/src/agent/Core/CoreMain.cpp +204 -60
  46. data/src/agent/Core/OptionParser.h +20 -3
  47. data/src/agent/Core/ResponseCache.h +3 -3
  48. data/src/agent/Core/SecurityUpdateChecker.h +4 -2
  49. data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +1 -1
  50. data/src/agent/Core/SpawningKit/Config.h +3 -2
  51. data/src/agent/Core/SpawningKit/Context.h +8 -2
  52. data/src/agent/Core/SpawningKit/DirectSpawner.h +4 -4
  53. data/src/agent/Core/SpawningKit/DummySpawner.h +3 -3
  54. data/src/agent/Core/SpawningKit/ErrorRenderer.h +1 -1
  55. data/src/agent/Core/SpawningKit/Exceptions.h +21 -14
  56. data/src/agent/Core/SpawningKit/Factory.h +1 -1
  57. data/src/agent/Core/SpawningKit/Handshake/BackgroundIOCapturer.h +1 -1
  58. data/src/agent/Core/SpawningKit/Handshake/Perform.h +14 -2
  59. data/src/agent/Core/SpawningKit/Handshake/Prepare.h +3 -3
  60. data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +1 -1
  61. data/src/agent/Core/SpawningKit/Journey.h +4 -5
  62. data/src/agent/Core/SpawningKit/PipeWatcher.h +1 -1
  63. data/src/agent/Core/SpawningKit/README.md +34 -17
  64. data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h +1 -1
  65. data/src/agent/Core/SpawningKit/Result.h +20 -8
  66. data/src/agent/Core/SpawningKit/SmartSpawner.h +7 -7
  67. data/src/agent/Core/SpawningKit/Spawner.h +25 -8
  68. data/src/agent/Core/SpawningKit/UserSwitchingRules.h +17 -7
  69. data/src/agent/Core/TelemetryCollector.h +681 -0
  70. data/src/agent/ExecHelper/ExecHelperMain.cpp +1 -1
  71. data/src/agent/FileReadHelper/FileReadHelperMain.cpp +198 -0
  72. data/src/agent/README.md +1 -1
  73. data/src/agent/Shared/ApiAccountUtils.h +1 -1
  74. data/src/agent/Shared/ApiServerUtils.h +3 -3
  75. data/src/agent/Shared/ApplicationPoolApiKey.h +2 -2
  76. data/src/agent/Shared/Fundamentals/AbortHandler.cpp +324 -98
  77. data/src/agent/Shared/Fundamentals/AbortHandler.h +31 -4
  78. data/src/agent/Shared/Fundamentals/Initialization.cpp +4 -5
  79. data/src/agent/Shared/Fundamentals/Initialization.h +9 -1
  80. data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +1 -1
  81. data/src/agent/SystemMetrics/SystemMetricsMain.cpp +4 -3
  82. data/src/agent/TempDirToucher/TempDirToucherMain.cpp +3 -3
  83. data/src/agent/Watchdog/ApiServer.h +3 -3
  84. data/src/agent/Watchdog/Config.h +24 -5
  85. data/src/agent/Watchdog/CoreWatcher.cpp +2 -2
  86. data/src/agent/Watchdog/WatchdogMain.cpp +97 -28
  87. data/src/apache2_module/Config.cpp +14 -14
  88. data/src/apache2_module/Config.h +8 -16
  89. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +510 -481
  90. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp.cxxcodebuilder +39 -17
  91. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +5 -0
  92. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +69 -1
  93. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp.cxxcodebuilder +31 -1
  94. data/src/apache2_module/ConfigGeneral/Common.h +45 -0
  95. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +17 -1
  96. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder +16 -1
  97. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +19 -5
  98. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp.cxxcodebuilder +26 -9
  99. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +19 -1
  100. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +10 -1
  101. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +14 -1
  102. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder +11 -1
  103. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +36 -1
  104. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +34 -1
  105. data/src/apache2_module/DirectoryMapper.h +36 -37
  106. data/src/apache2_module/Hooks.cpp +27 -8
  107. data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +20 -0
  108. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +48 -1
  109. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder +36 -1
  110. data/src/cxx_supportlib/{Utils → Algorithms}/Hasher.cpp +2 -2
  111. data/src/cxx_supportlib/{Utils → Algorithms}/Hasher.h +4 -4
  112. data/src/cxx_supportlib/AppLocalConfigFileUtils.h +148 -0
  113. data/src/cxx_supportlib/AppTypeDetector/CBindings.cpp +147 -0
  114. data/src/cxx_supportlib/AppTypeDetector/CBindings.h +75 -0
  115. data/src/cxx_supportlib/{AppTypes.h → AppTypeDetector/Detector.h} +92 -131
  116. data/src/cxx_supportlib/ConfigKit/README.md +90 -2
  117. data/src/cxx_supportlib/ConfigKit/Schema.h +60 -15
  118. data/src/cxx_supportlib/ConfigKit/Store.h +129 -5
  119. data/src/cxx_supportlib/Constants.h +1 -1
  120. data/src/cxx_supportlib/{Utils → DataStructures}/HashMap.h +4 -4
  121. data/src/cxx_supportlib/DataStructures/HashedStaticString.h +5 -5
  122. data/src/cxx_supportlib/DataStructures/LString.h +3 -3
  123. data/src/cxx_supportlib/{Utils → DataStructures}/StringMap.h +36 -36
  124. data/src/cxx_supportlib/FileTools/FileManip.cpp +1 -1
  125. data/src/cxx_supportlib/FileTools/PathManip.cpp +2 -2
  126. data/src/cxx_supportlib/FileTools/PathSecurityCheck.cpp +1 -1
  127. data/src/cxx_supportlib/Hooks.h +2 -2
  128. data/src/cxx_supportlib/{Utils → IOTools}/BufferedIO.h +5 -5
  129. data/src/cxx_supportlib/{Utils → IOTools}/IOUtils.cpp +4 -3
  130. data/src/cxx_supportlib/{Utils → IOTools}/IOUtils.h +3 -3
  131. data/src/cxx_supportlib/{Utils → IOTools}/MessageIO.h +7 -7
  132. data/src/cxx_supportlib/{MessageReadersWriters.h → IOTools/MessageSerialization.h} +5 -5
  133. data/src/cxx_supportlib/InstanceDirectory.h +4 -4
  134. data/src/cxx_supportlib/Integrations/LibevJsonUtils.h +3 -3
  135. data/src/cxx_supportlib/{Utils → JsonTools}/JsonUtils.h +5 -5
  136. data/src/cxx_supportlib/LoggingKit/Context.h +2 -2
  137. data/src/cxx_supportlib/LoggingKit/Implementation.cpp +3 -3
  138. data/src/cxx_supportlib/MemoryKit/mbuf.cpp +2 -2
  139. data/src/cxx_supportlib/ProcessManagement/Ruby.cpp +3 -3
  140. data/src/cxx_supportlib/ProcessManagement/Ruby.h +7 -2
  141. data/src/cxx_supportlib/ProcessManagement/Spawn.cpp +19 -12
  142. data/src/cxx_supportlib/ProcessManagement/Spawn.h +21 -2
  143. data/src/cxx_supportlib/ProcessManagement/Utils.h +10 -0
  144. data/src/cxx_supportlib/RandomGenerator.h +2 -2
  145. data/src/cxx_supportlib/ResourceLocator.h +1 -1
  146. data/src/cxx_supportlib/{Crypto.cpp → SecurityKit/Crypto.cpp} +4 -4
  147. data/src/cxx_supportlib/{Crypto.h → SecurityKit/Crypto.h} +4 -4
  148. data/src/cxx_supportlib/{Utils → SecurityKit}/MemZeroGuard.h +0 -0
  149. data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +2 -2
  150. data/src/cxx_supportlib/ServerKit/Channel.h +1 -1
  151. data/src/cxx_supportlib/ServerKit/ClientRef.h +17 -7
  152. data/src/cxx_supportlib/ServerKit/Context.h +2 -2
  153. data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +1 -1
  154. data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +3 -3
  155. data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +2 -2
  156. data/src/cxx_supportlib/ServerKit/HttpRequestRef.h +17 -7
  157. data/src/cxx_supportlib/ServerKit/HttpServer.h +16 -10
  158. data/src/cxx_supportlib/ServerKit/Server.h +3 -4
  159. data/src/cxx_supportlib/{Utils → StrIntTools}/DateParsing.h +5 -5
  160. data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtils.cpp +3 -3
  161. data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtils.h +0 -0
  162. data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtilsNoStrictAliasing.cpp +12 -12
  163. data/src/cxx_supportlib/{Utils → StrIntTools}/StringScanning.h +5 -5
  164. data/src/cxx_supportlib/{Utils → StrIntTools}/Template.h +30 -5
  165. data/src/cxx_supportlib/SystemTools/ContainerHelpers.h +88 -0
  166. data/src/cxx_supportlib/{Utils → SystemTools}/ProcessMetricsCollector.h +15 -12
  167. data/src/cxx_supportlib/{Utils → SystemTools}/SystemMetricsCollector.h +3 -3
  168. data/src/cxx_supportlib/{Utils → SystemTools}/SystemTime.cpp +1 -1
  169. data/src/cxx_supportlib/{Utils → SystemTools}/SystemTime.h +0 -0
  170. data/src/cxx_supportlib/SystemTools/UserDatabase.h +1 -1
  171. data/src/cxx_supportlib/Utils/CachedFileStat.hpp +3 -3
  172. data/src/cxx_supportlib/Utils/Curl.h +2 -2
  173. data/src/cxx_supportlib/Utils/FileChangeChecker.h +2 -2
  174. data/src/cxx_supportlib/Utils/MessagePassing.h +1 -1
  175. data/src/cxx_supportlib/Utils/SpeedMeter.h +2 -2
  176. data/src/cxx_supportlib/Utils/Timer.h +2 -2
  177. data/src/cxx_supportlib/Utils/VariantMap.h +3 -3
  178. data/src/cxx_supportlib/Utils.cpp +2 -2
  179. data/src/cxx_supportlib/WatchdogLauncher.h +3 -3
  180. data/src/cxx_supportlib/WebSocketCommandReverseServer.h +1 -1
  181. data/src/cxx_supportlib/WrapperRegistry/CBindings.cpp +85 -0
  182. data/src/cxx_supportlib/{Utils/MemoryBarrier.h → WrapperRegistry/CBindings.h} +30 -27
  183. data/src/cxx_supportlib/WrapperRegistry/Entry.h +112 -0
  184. data/src/cxx_supportlib/WrapperRegistry/README.md +37 -0
  185. data/src/cxx_supportlib/WrapperRegistry/Registry.h +309 -0
  186. data/src/cxx_supportlib/vendor-modified/psg_sysqueue.h +3 -0
  187. data/src/helper-scripts/download_binaries/extconf.rb +6 -2
  188. data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +32 -0
  189. data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +12 -0
  190. data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +36 -0
  191. data/src/nginx_module/Configuration.c +23 -3
  192. data/src/nginx_module/ContentHandler.c +331 -32
  193. data/src/nginx_module/ContentHandler.h +8 -3
  194. data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +10 -0
  195. data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +27 -0
  196. data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +3 -0
  197. data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +7 -0
  198. data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +11 -0
  199. data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +23 -0
  200. data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +8 -0
  201. data/src/nginx_module/config +2 -1
  202. data/src/nginx_module/ngx_http_passenger_module.c +9 -3
  203. data/src/nginx_module/ngx_http_passenger_module.h +10 -3
  204. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +19 -0
  205. data/src/ruby_supportlib/phusion_passenger/common_library.rb +19 -16
  206. data/src/ruby_supportlib/phusion_passenger/config/agent_compiler.rb +4 -4
  207. data/src/ruby_supportlib/phusion_passenger/config/download_agent_command.rb +6 -2
  208. data/src/ruby_supportlib/phusion_passenger/config/download_nginx_engine_command.rb +6 -2
  209. data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +1 -1
  210. data/src/ruby_supportlib/phusion_passenger/message_channel.rb +2 -2
  211. data/src/ruby_supportlib/phusion_passenger/native_support.rb +7 -3
  212. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +29 -0
  213. data/src/ruby_supportlib/phusion_passenger/packaging.rb +20 -19
  214. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +22 -4
  215. data/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb +33 -13
  216. data/src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb +1 -0
  217. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +22 -2
  218. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +4 -1
  219. data/src/ruby_supportlib/phusion_passenger.rb +7 -5
  220. data/src/schema_printer/SchemaPrinterMain.cpp +2 -0
  221. metadata +40 -89
  222. data/.editorconfig +0 -134
  223. data/CODE_OF_CONDUCT.md +0 -52
  224. data/dev/boost-patches/0001-Patch-boost-thread-so-that-oxt-thread-can-use-it.patch +0 -48
  225. data/dev/boost-patches/0002-Make-boost-thread_interrupted-derive-from-oxt-tracab.patch +0 -33
  226. data/dev/boost-patches/0003-Disable-a-Clang-pragma-to-prevent-warnings-on-OS-X.patch +0 -25
  227. data/dev/ci/README.md +0 -134
  228. data/dev/ci/lib/functions.sh +0 -129
  229. data/dev/ci/lib/set-container-envvars.sh +0 -53
  230. data/dev/ci/lib/setup-container.sh +0 -46
  231. data/dev/ci/run-tests-natively +0 -24
  232. data/dev/ci/run-tests-with-docker +0 -42
  233. data/dev/ci/scripts/debug-console-wrapper.sh +0 -29
  234. data/dev/ci/scripts/docker-entrypoint-stage2.sh +0 -17
  235. data/dev/ci/scripts/docker-entrypoint.sh +0 -17
  236. data/dev/ci/scripts/inituidgid +0 -17
  237. data/dev/ci/scripts/run-tests-natively-stage2.sh +0 -17
  238. data/dev/ci/scripts/setup-host-natively.sh +0 -11
  239. data/dev/ci/setup-host +0 -56
  240. data/dev/ci/tests/apache2/run +0 -6
  241. data/dev/ci/tests/apache2/setup +0 -4
  242. data/dev/ci/tests/binaries/Jenkinsfile +0 -105
  243. data/dev/ci/tests/binaries/build-linux +0 -38
  244. data/dev/ci/tests/binaries/build-macos +0 -40
  245. data/dev/ci/tests/binaries/prepare-macos +0 -38
  246. data/dev/ci/tests/binaries/test-linux +0 -45
  247. data/dev/ci/tests/binaries/test-macos +0 -38
  248. data/dev/ci/tests/cxx/run +0 -9
  249. data/dev/ci/tests/cxx/setup +0 -4
  250. data/dev/ci/tests/debian/Jenkinsfile +0 -89
  251. data/dev/ci/tests/debian/run +0 -60
  252. data/dev/ci/tests/nginx/run +0 -5
  253. data/dev/ci/tests/nginx/setup +0 -4
  254. data/dev/ci/tests/nginx-dynamic/run +0 -20
  255. data/dev/ci/tests/nginx-dynamic/setup +0 -4
  256. data/dev/ci/tests/nodejs/run +0 -4
  257. data/dev/ci/tests/nodejs/setup +0 -4
  258. data/dev/ci/tests/rpm/Jenkinsfile +0 -68
  259. data/dev/ci/tests/rpm/run +0 -63
  260. data/dev/ci/tests/ruby/run +0 -4
  261. data/dev/ci/tests/ruby/setup +0 -4
  262. data/dev/ci/tests/source-packaging/run +0 -4
  263. data/dev/ci/tests/source-packaging/setup +0 -4
  264. data/dev/ci/tests/standalone/run +0 -4
  265. data/dev/ci/tests/standalone/setup +0 -4
  266. data/dev/configkit-schemas/index.json +0 -1748
  267. data/dev/configkit-schemas/update_schema_inline_comments.rb +0 -118
  268. data/dev/rack.test/config.ru +0 -5
  269. data/dev/rack.test/public/asset.txt +0 -1
  270. data/dev/vagrant/apache_default_site.conf +0 -35
  271. data/dev/vagrant/apache_passenger.conf +0 -5
  272. data/dev/vagrant/apache_passenger.load +0 -1
  273. data/dev/vagrant/apache_ports.conf +0 -24
  274. data/dev/vagrant/apache_rack_test.conf +0 -9
  275. data/dev/vagrant/bashrc +0 -23
  276. data/dev/vagrant/nginx.conf +0 -39
  277. data/dev/vagrant/nginx_rakefile +0 -33
  278. data/dev/vagrant/nginx_start +0 -32
  279. data/dev/vagrant/provision.sh +0 -117
  280. data/dev/vagrant/sudoers.conf +0 -5
  281. data/resources/templates/error_renderer/.editorconfig +0 -19
  282. data/src/cxx_supportlib/AppTypes.cpp +0 -109
  283. data/src/cxx_supportlib/vendor-modified/SmallVector.h +0 -653
@@ -0,0 +1,37 @@
1
+ # The wrapper registry
2
+
3
+ The wrapper registry (the Registry class) describes for which languages Passenger has wrappers available. Each entry (the Entry class) describes:
4
+
5
+ * An identifier for this language (ex: `rack`). Related to `passenger_app_type`.
6
+ * The path to the wrapper (ex. `rack-loader.rb`).
7
+ * The title that the spawned process should assume (ex: `Passenger RubyApp`).
8
+ * The default interpreter command for this language (ex: `ruby`). Related to `passenger_ruby`, among others.
9
+ * Zero or more names for the default startup file (ex: `config.ru`, `app.js`, `index.js`). Related to `passenger_startup_file`.
10
+
11
+ ## Synopsis
12
+
13
+ After construction, one can add entries to the registry. When done, one must call `finalize()` after which no more mutations are allowed. The Registry will contain some built-in, hardcoded entries after construction.
14
+
15
+ Given a language identifier, the Registry can lookup the corresponding Entry.
16
+
17
+ ~~~c++
18
+ Registry reg;
19
+ reg.finalize();
20
+
21
+ const Entry &ruby = reg.lookup("ruby");
22
+ cout << ruby.language << endl; // => ruby
23
+ cout << ruby.path << endl; // => rack-loader.rb
24
+ // etc
25
+ ~~~
26
+
27
+ ## Properties
28
+
29
+ The Registry, after finalization, is a static, immutable, in-memory database. Default, built-in, hardcoded entries are inserted during object creation. Registry allows adding additional entries after creation, but this functionality is not actually used and is reserved for the future. So at present, the Registry will only contain a small number of known entries.
30
+
31
+ After finalization, Registry is thread-safe because of its immutability.
32
+
33
+ Entries' lifetimes are the same as that of the Registry itself.
34
+
35
+ ## Relationships
36
+
37
+ The wrapper registry's main use is to be used by the AppTypeDetector, to detect what kind of application lives in a certain directory, and (if applicable) which wrapper should be used.
@@ -0,0 +1,309 @@
1
+ /*
2
+ * Phusion Passenger - https://www.phusionpassenger.com/
3
+ * Copyright (c) 2018 Phusion Holding B.V.
4
+ *
5
+ * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
+ * trademarks of Phusion Holding B.V.
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in
16
+ * all copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ * THE SOFTWARE.
25
+ */
26
+ #ifndef _PASSENGER_WRAPPER_REGISTRY_REGISTRY_H_
27
+ #define _PASSENGER_WRAPPER_REGISTRY_REGISTRY_H_
28
+
29
+ #include <cassert>
30
+ #include <cstddef>
31
+
32
+ #include <boost/foreach.hpp>
33
+ #include <boost/shared_array.hpp>
34
+ #include <oxt/macros.hpp>
35
+
36
+ #include <WrapperRegistry/Entry.h>
37
+ #include <DataStructures/StringKeyTable.h>
38
+ #include <Constants.h>
39
+ #include <Utils.h>
40
+ #include <StrIntTools/StrIntUtils.h>
41
+
42
+ namespace Passenger {
43
+ namespace WrapperRegistry {
44
+
45
+ using namespace std;
46
+
47
+
48
+ class Registry {
49
+ public:
50
+ typedef StringKeyTable<Entry>::ConstIterator ConstIterator;
51
+
52
+ private:
53
+ StringKeyTable<Entry> entries;
54
+ StringKeyTable<HashedStaticString> aliases;
55
+ boost::shared_array<char> storage;
56
+ const Entry nullEntry;
57
+ bool finalized;
58
+
59
+ void internStrings() {
60
+ size_t totalSize = 0;
61
+ size_t tmpSize;
62
+ char *newStorage, *pos, *end;
63
+
64
+ // Calculate required storage size
65
+ {
66
+ StringKeyTable<Entry>::ConstIterator it(entries);
67
+ while (*it != NULL) {
68
+ const Entry &entry = it.getValue();
69
+
70
+ totalSize += entry.language.size() + 1;
71
+ totalSize += entry.languageDisplayName.size() + 1;
72
+ totalSize += entry.path.size() + 1;
73
+ totalSize += entry.processTitle.size() + 1;
74
+ totalSize += entry.defaultInterpreter.size() + 1;
75
+ foreach (const StaticString &defaultStartupFile,
76
+ entry.defaultStartupFiles)
77
+ {
78
+ totalSize += defaultStartupFile.size() + 1;
79
+ }
80
+
81
+ it.next();
82
+ }
83
+ }
84
+ {
85
+ StringKeyTable<HashedStaticString>::ConstIterator it(aliases);
86
+ while (*it != NULL) {
87
+ const HashedStaticString &name = it.getValue();
88
+ totalSize += name.size() + 1;
89
+ it.next();
90
+ }
91
+ }
92
+
93
+ // Allocate new storage
94
+ newStorage = pos = new char[totalSize];
95
+ end = newStorage + totalSize;
96
+
97
+ // Fill new storage
98
+ {
99
+ StringKeyTable<Entry>::ConstIterator it(entries);
100
+ while (*it != NULL) {
101
+ const Entry &entry = it.getValue();
102
+
103
+ pos = appendData(pos, end, entry.language);
104
+ pos = appendData(pos, end, "\0", 1);
105
+
106
+ pos = appendData(pos, end, entry.languageDisplayName);
107
+ pos = appendData(pos, end, "\0", 1);
108
+
109
+ pos = appendData(pos, end, entry.path);
110
+ pos = appendData(pos, end, "\0", 1);
111
+
112
+ pos = appendData(pos, end, entry.processTitle);
113
+ pos = appendData(pos, end, "\0", 1);
114
+
115
+ pos = appendData(pos, end, entry.defaultInterpreter);
116
+ pos = appendData(pos, end, "\0", 1);
117
+
118
+ foreach (const StaticString &defaultStartupFile,
119
+ entry.defaultStartupFiles)
120
+ {
121
+ pos = appendData(pos, end, defaultStartupFile);
122
+ pos = appendData(pos, end, "\0", 1);
123
+ }
124
+
125
+ it.next();
126
+ }
127
+ }
128
+ {
129
+ StringKeyTable<HashedStaticString>::ConstIterator it(aliases);
130
+ while (*it != NULL) {
131
+ const HashedStaticString &name = it.getValue();
132
+ pos = appendData(pos, end, name);
133
+ pos = appendData(pos, end, "\0", 1);
134
+ it.next();
135
+ }
136
+ }
137
+
138
+ // Move over pointers to new storage
139
+ {
140
+ StringKeyTable<Entry>::Iterator it(entries);
141
+ pos = newStorage;
142
+ while (*it != NULL) {
143
+ Entry &entry = it.getValue();
144
+
145
+ tmpSize = entry.language.size();
146
+ entry.language = StaticString(pos, tmpSize);
147
+ pos += tmpSize + 1;
148
+
149
+ tmpSize = entry.languageDisplayName.size();
150
+ entry.languageDisplayName = StaticString(pos, tmpSize);
151
+ pos += tmpSize + 1;
152
+
153
+ tmpSize = entry.path.size();
154
+ entry.path = StaticString(pos, tmpSize);
155
+ pos += tmpSize + 1;
156
+
157
+ tmpSize = entry.processTitle.size();
158
+ entry.processTitle = StaticString(pos, tmpSize);
159
+ pos += tmpSize + 1;
160
+
161
+ tmpSize = entry.defaultInterpreter.size();
162
+ entry.defaultInterpreter = StaticString(pos, tmpSize);
163
+ pos += tmpSize + 1;
164
+
165
+ foreach (StaticString &defaultStartupFile,
166
+ entry.defaultStartupFiles)
167
+ {
168
+ tmpSize = defaultStartupFile.size();
169
+ defaultStartupFile = StaticString(pos, tmpSize);
170
+ pos += tmpSize + 1;
171
+ }
172
+
173
+ it.next();
174
+ }
175
+ }
176
+ {
177
+ StringKeyTable<HashedStaticString>::Iterator it(aliases);
178
+ while (*it != NULL) {
179
+ HashedStaticString &name = it.getValue();
180
+ tmpSize = name.size();
181
+ name = StaticString(pos, tmpSize);
182
+ pos += tmpSize + 1;
183
+ it.next();
184
+ }
185
+ }
186
+
187
+ // Commit current storage
188
+ storage.reset(newStorage);
189
+ }
190
+
191
+ void
192
+ addBuiltinEntries() {
193
+ {
194
+ Entry entry;
195
+ entry.language = "ruby";
196
+ entry.languageDisplayName = "Ruby";
197
+ entry.path = "rack-loader.rb";
198
+ entry.processTitle = SHORT_PROGRAM_NAME " RubyApp";
199
+ entry.defaultInterpreter = "ruby";
200
+ entry.defaultStartupFiles.push_back("config.ru");
201
+ entries.insert(entry.language, entry);
202
+ aliases.insert("rack", "ruby");
203
+ }
204
+
205
+ {
206
+ Entry entry;
207
+ entry.language = "nodejs";
208
+ entry.languageDisplayName = "Node.js";
209
+ entry.path = "node-loader.js";
210
+ entry.processTitle = SHORT_PROGRAM_NAME " NodejsApp";
211
+ entry.defaultInterpreter = "node";
212
+ // Other code in Passenger does not yet support the notion
213
+ // of multiple defaultStartupFiles.
214
+ //entry.defaultStartupFiles.push_back("index.js");
215
+ entry.defaultStartupFiles.push_back("app.js");
216
+ entries.insert(entry.language, entry);
217
+ aliases.insert("node", "nodejs");
218
+ }
219
+
220
+ {
221
+ Entry entry;
222
+ entry.language = "python";
223
+ entry.languageDisplayName = "Python";
224
+ entry.path = "wsgi-loader.py";
225
+ entry.processTitle = SHORT_PROGRAM_NAME " PythonApp";
226
+ entry.defaultInterpreter = "python";
227
+ entry.defaultStartupFiles.push_back("passenger_wsgi.py");
228
+ entries.insert(entry.language, entry);
229
+ aliases.insert("wsgi", "python");
230
+ }
231
+
232
+ {
233
+ Entry entry;
234
+ entry.language = "meteor";
235
+ entry.languageDisplayName = "Meteor";
236
+ entry.path = "meteor-loader.rb";
237
+ entry.processTitle = SHORT_PROGRAM_NAME " MeteorApp";
238
+ entry.defaultInterpreter = "ruby"; // because meteor-loader.rb is in Ruby
239
+ entry.defaultStartupFiles.push_back(".meteor");
240
+ entries.insert(entry.language, entry);
241
+ }
242
+
243
+ internStrings();
244
+ }
245
+
246
+ public:
247
+ Registry()
248
+ : finalized(false)
249
+ {
250
+ addBuiltinEntries();
251
+ }
252
+
253
+ bool add(const Entry &entry) {
254
+ assert(!isFinalized());
255
+ // Disallow overwriting builtin entries for security reasons.
256
+ // Not sure whether overwriting builtin entries can be harmful
257
+ // but let's err on the safe side.
258
+ bool result = entries.insert(entry.language, entry, false);
259
+ internStrings();
260
+ return result;
261
+ }
262
+
263
+ bool isFinalized() const {
264
+ return finalized;
265
+ }
266
+
267
+ void finalize() {
268
+ assert(!isFinalized());
269
+ entries.compact();
270
+ aliases.compact();
271
+ finalized = true;
272
+ }
273
+
274
+ const Entry &lookup(const HashedStaticString &name) const {
275
+ assert(isFinalized());
276
+
277
+ if (OXT_UNLIKELY(name.empty())) {
278
+ return nullEntry;
279
+ }
280
+
281
+ const Entry *result;
282
+ HashedStaticString aliasTarget = aliases.lookupCopy(name);
283
+ if (aliasTarget.empty()) {
284
+ entries.lookup(name, &result);
285
+ } else {
286
+ entries.lookup(aliasTarget, &result);
287
+ }
288
+ if (result != NULL) {
289
+ return *result;
290
+ } else {
291
+ return nullEntry;
292
+ }
293
+ }
294
+
295
+ const Entry &getNullEntry() const {
296
+ return nullEntry;
297
+ }
298
+
299
+ ConstIterator getIterator() const {
300
+ assert(isFinalized());
301
+ return ConstIterator(entries);
302
+ }
303
+ };
304
+
305
+
306
+ } // namespace WrapperRegistry
307
+ } // namespace Passenger
308
+
309
+ #endif /* _PASSENGER_WRAPPER_REGISTRY_REGISTRY_H_ */
@@ -129,6 +129,9 @@
129
129
  #undef LIST_ENTRY
130
130
  #undef LIST_REMOVE
131
131
  #undef LIST_SWAP
132
+ #undef LIST_INSERT_BEFORE
133
+ #undef LIST_INSERT_AFTER
134
+ #undef LIST_INSERT_HEAD
132
135
  #undef TAILQ_HEAD
133
136
  #undef TAILQ_ENTRY
134
137
  #undef TAILQ_INSERT_AFTER
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # Phusion Passenger - https://www.phusionpassenger.com/
3
- # Copyright (c) 2010-2017 Phusion Holding B.V.
3
+ # Copyright (c) 2010-2018 Phusion Holding B.V.
4
4
  #
5
5
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
6
6
  # trademarks of Phusion Holding B.V.
@@ -95,7 +95,11 @@ def download(name, options = {})
95
95
  end
96
96
 
97
97
  def really_download(site, name, logger, options)
98
- url = "#{site[:url]}/#{PhusionPassenger::VERSION_STRING}/#{name}"
98
+ if site[:url].include?('{{VERSION}}')
99
+ url = site[:url].gsub('{{VERSION}}', PhusionPassenger::VERSION_STRING) + "/#{name}"
100
+ else
101
+ url = "#{site[:url]}/#{PhusionPassenger::VERSION_STRING}/#{name}"
102
+ end
99
103
  puts "Attempting to download #{url} into #{Dir.pwd}"
100
104
  File.unlink("#{name}.tmp") rescue nil
101
105
 
@@ -134,6 +134,22 @@
134
134
  offsetof(passenger_main_conf_t, autogenerated.security_update_check_proxy),
135
135
  NULL
136
136
  },
137
+ {
138
+ ngx_string("passenger_disable_anonymous_telemetry"),
139
+ NGX_HTTP_MAIN_CONF | NGX_CONF_FLAG,
140
+ passenger_conf_set_disable_anonymous_telemetry,
141
+ NGX_HTTP_MAIN_CONF_OFFSET,
142
+ offsetof(passenger_main_conf_t, autogenerated.disable_anonymous_telemetry),
143
+ NULL
144
+ },
145
+ {
146
+ ngx_string("passenger_anonymous_telemetry_proxy"),
147
+ NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
148
+ passenger_conf_set_anonymous_telemetry_proxy,
149
+ NGX_HTTP_MAIN_CONF_OFFSET,
150
+ offsetof(passenger_main_conf_t, autogenerated.anonymous_telemetry_proxy),
151
+ NULL
152
+ },
137
153
  {
138
154
  ngx_string("passenger_pre_start"),
139
155
  NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
@@ -446,6 +462,14 @@
446
462
  offsetof(passenger_loc_conf_t, autogenerated.startup_file),
447
463
  NULL
448
464
  },
465
+ {
466
+ ngx_string("passenger_app_start_command"),
467
+ NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
468
+ passenger_conf_set_app_start_command,
469
+ NGX_HTTP_LOC_CONF_OFFSET,
470
+ offsetof(passenger_loc_conf_t, autogenerated.app_start_command),
471
+ NULL
472
+ },
449
473
  {
450
474
  ngx_string("passenger_restart_dir"),
451
475
  NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
@@ -590,6 +614,14 @@
590
614
  offsetof(passenger_loc_conf_t, upstream_config.busy_buffers_size_conf),
591
615
  NULL
592
616
  },
617
+ {
618
+ ngx_string("passenger_request_buffering"),
619
+ NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
620
+ passenger_conf_set_request_buffering,
621
+ NGX_HTTP_LOC_CONF_OFFSET,
622
+ offsetof(passenger_loc_conf_t, upstream_config.request_buffering),
623
+ NULL
624
+ },
593
625
  {
594
626
  ngx_string("passenger_intercept_errors"),
595
627
  NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
@@ -87,6 +87,12 @@ set_manifest_autogenerated_global_conf_defaults(manifest_gen_ctx_t *ctx) {
87
87
  sizeof("passenger_disable_security_update_check") - 1,
88
88
  0);
89
89
 
90
+ add_manifest_options_container_static_default_bool(ctx,
91
+ ctx->global_config_container,
92
+ "passenger_disable_anonymous_telemetry",
93
+ sizeof("passenger_disable_anonymous_telemetry") - 1,
94
+ 0);
95
+
90
96
  add_manifest_options_container_dynamic_default(ctx,
91
97
  ctx->global_config_container,
92
98
  "passenger_instance_registry_dir",
@@ -374,6 +380,12 @@ set_manifest_autogenerated_loc_conf_defaults(manifest_gen_ctx_t *ctx, PsgJsonVal
374
380
  "8k|16k",
375
381
  sizeof("8k|16k") - 1);
376
382
 
383
+ add_manifest_options_container_static_default_bool(ctx,
384
+ options_container,
385
+ "passenger_request_buffering",
386
+ sizeof("passenger_request_buffering") - 1,
387
+ 1);
388
+
377
389
  add_manifest_options_container_static_default_bool(ctx,
378
390
  options_container,
379
391
  "passenger_intercept_errors",
@@ -217,6 +217,30 @@ passenger_conf_set_security_update_check_proxy(ngx_conf_t *cf, ngx_command_t *cm
217
217
  return ngx_conf_set_str_slot(cf, cmd, conf);
218
218
  }
219
219
 
220
+ static char *
221
+ passenger_conf_set_disable_anonymous_telemetry(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
222
+ passenger_main_conf_t *passenger_conf = conf;
223
+
224
+ passenger_conf->autogenerated.disable_anonymous_telemetry_explicitly_set = 1;
225
+ record_main_conf_source_location(cf,
226
+ &passenger_conf->autogenerated.disable_anonymous_telemetry_source_file,
227
+ &passenger_conf->autogenerated.disable_anonymous_telemetry_source_line);
228
+
229
+ return ngx_conf_set_flag_slot(cf, cmd, conf);
230
+ }
231
+
232
+ static char *
233
+ passenger_conf_set_anonymous_telemetry_proxy(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
234
+ passenger_main_conf_t *passenger_conf = conf;
235
+
236
+ passenger_conf->autogenerated.anonymous_telemetry_proxy_explicitly_set = 1;
237
+ record_main_conf_source_location(cf,
238
+ &passenger_conf->autogenerated.anonymous_telemetry_proxy_source_file,
239
+ &passenger_conf->autogenerated.anonymous_telemetry_proxy_source_line);
240
+
241
+ return ngx_conf_set_str_slot(cf, cmd, conf);
242
+ }
243
+
220
244
  static char *
221
245
  passenger_conf_set_pre_start(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
222
246
  passenger_main_conf_t *passenger_conf = conf;
@@ -685,6 +709,18 @@ passenger_conf_set_startup_file(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
685
709
  return ngx_conf_set_str_slot(cf, cmd, conf);
686
710
  }
687
711
 
712
+ static char *
713
+ passenger_conf_set_app_start_command(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
714
+ passenger_loc_conf_t *passenger_conf = conf;
715
+
716
+ passenger_conf->autogenerated.app_start_command_explicitly_set = 1;
717
+ record_loc_conf_source_location(cf, passenger_conf,
718
+ &passenger_conf->autogenerated.app_start_command_source_file,
719
+ &passenger_conf->autogenerated.app_start_command_source_line);
720
+
721
+ return ngx_conf_set_str_slot(cf, cmd, conf);
722
+ }
723
+
688
724
  static char *
689
725
  passenger_conf_set_restart_dir(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
690
726
  passenger_loc_conf_t *passenger_conf = conf;
@@ -207,6 +207,7 @@ passenger_create_loc_conf(ngx_conf_t *cf)
207
207
  conf->upstream_config.next_upstream_tries = NGX_CONF_UNSET_UINT;
208
208
  #endif
209
209
  conf->upstream_config.buffering = NGX_CONF_UNSET;
210
+ conf->upstream_config.request_buffering = NGX_CONF_UNSET;
210
211
  conf->upstream_config.ignore_client_abort = NGX_CONF_UNSET;
211
212
  #if NGINX_VERSION_NUM >= 1007007
212
213
  conf->upstream_config.force_ranges = NGX_CONF_UNSET;
@@ -429,6 +430,9 @@ passenger_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
429
430
  ngx_conf_merge_value(conf->upstream_config.buffering,
430
431
  prev->upstream_config.buffering, 0);
431
432
 
433
+ ngx_conf_merge_value(conf->upstream_config.request_buffering,
434
+ prev->upstream_config.request_buffering, 1);
435
+
432
436
  ngx_conf_merge_value(conf->upstream_config.ignore_client_abort,
433
437
  prev->upstream_config.ignore_client_abort, 0);
434
438
 
@@ -827,7 +831,7 @@ merge_headers(ngx_conf_t *cf, passenger_loc_conf_t *conf, passenger_loc_conf_t *
827
831
  return NGX_ERROR;
828
832
  }
829
833
 
830
- copy->code = (ngx_http_script_code_pt)
834
+ copy->code = (ngx_http_script_code_pt) (void *)
831
835
  ngx_http_script_copy_len_code;
832
836
  copy->len = src[i].key.len + sizeof(": ") - 1
833
837
  + src[i].value.len + sizeof(CRLF) - 1;
@@ -862,7 +866,7 @@ merge_headers(ngx_conf_t *cf, passenger_loc_conf_t *conf, passenger_loc_conf_t *
862
866
  return NGX_ERROR;
863
867
  }
864
868
 
865
- copy->code = (ngx_http_script_code_pt)
869
+ copy->code = (ngx_http_script_code_pt) (void *)
866
870
  ngx_http_script_copy_len_code;
867
871
  copy->len = src[i].key.len + sizeof(": ") - 1;
868
872
 
@@ -903,7 +907,7 @@ merge_headers(ngx_conf_t *cf, passenger_loc_conf_t *conf, passenger_loc_conf_t *
903
907
  return NGX_ERROR;
904
908
  }
905
909
 
906
- copy->code = (ngx_http_script_code_pt)
910
+ copy->code = (ngx_http_script_code_pt) (void *)
907
911
  ngx_http_script_copy_len_code;
908
912
  copy->len = sizeof(CRLF) - 1;
909
913
 
@@ -1141,6 +1145,22 @@ passenger_enabled(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
1141
1145
  return NGX_CONF_OK;
1142
1146
  }
1143
1147
 
1148
+ static char *
1149
+ passenger_conf_set_request_buffering(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
1150
+ #ifdef NGINX_NO_SEND_REQUEST_BODY_INFINITE_LOOP_BUG
1151
+ passenger_loc_conf_t *passenger_conf = conf;
1152
+
1153
+ passenger_conf->autogenerated.upstream_config_request_buffering_explicitly_set = 1;
1154
+ record_loc_conf_source_location(cf, passenger_conf,
1155
+ &passenger_conf->autogenerated.upstream_config_request_buffering_source_file,
1156
+ &passenger_conf->autogenerated.upstream_config_request_buffering_source_line);
1157
+
1158
+ return ngx_conf_set_flag_slot(cf, cmd, conf);
1159
+ #else
1160
+ return "config cannot be set in Nginx < 1.15.3 due to this bug: https://trac.nginx.org/nginx/ticket/1618";
1161
+ #endif /* NGINX_NO_SEND_REQUEST_BODY_INFINITE_LOOP_BUG */
1162
+ }
1163
+
1144
1164
  static char *
1145
1165
  rails_framework_spawner_idle_time(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
1146
1166
  {