passenger 5.3.5 → 5.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +13 -0
- data/README.md +2 -1
- data/Rakefile +0 -5
- data/build/agent.rb +2 -1
- data/build/cxx_tests.rb +18 -20
- data/build/integration_tests.rb +6 -2
- data/build/support/cxx_dependency_map.rb +2019 -1966
- data/dev/colorize-logs +272 -0
- data/src/agent/Core/AdminPanelConnector.h +3 -3
- data/src/agent/Core/ApiServer.h +4 -4
- data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +2 -2
- data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +2 -2
- data/src/agent/Core/ApplicationPool/Implementation.cpp +5 -5
- data/src/agent/Core/ApplicationPool/Pool.h +4 -4
- data/src/agent/Core/ApplicationPool/Process.h +10 -15
- data/src/agent/Core/ApplicationPool/Socket.h +2 -2
- data/src/agent/Core/ApplicationPool/TestSession.h +3 -3
- data/src/agent/Core/Config.h +4 -2
- data/src/agent/Core/Controller.h +4 -4
- data/src/agent/Core/Controller/Config.h +1 -1
- data/src/agent/Core/Controller/SendRequest.cpp +2 -2
- data/src/agent/Core/Controller/TurboCaching.h +2 -2
- data/src/agent/Core/CoreMain.cpp +2 -2
- data/src/agent/Core/OptionParser.h +2 -2
- data/src/agent/Core/ResponseCache.h +3 -3
- data/src/agent/Core/SecurityUpdateChecker.h +2 -2
- data/src/agent/Core/SpawningKit/Config.h +2 -1
- data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +1 -1
- data/src/agent/Core/SpawningKit/Context.h +1 -1
- data/src/agent/Core/SpawningKit/DirectSpawner.h +3 -3
- data/src/agent/Core/SpawningKit/DummySpawner.h +3 -3
- data/src/agent/Core/SpawningKit/ErrorRenderer.h +1 -1
- data/src/agent/Core/SpawningKit/Exceptions.h +2 -2
- data/src/agent/Core/SpawningKit/Factory.h +1 -1
- data/src/agent/Core/SpawningKit/Handshake/BackgroundIOCapturer.h +1 -1
- data/src/agent/Core/SpawningKit/Handshake/Perform.h +13 -2
- data/src/agent/Core/SpawningKit/Handshake/Prepare.h +3 -3
- data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +1 -1
- data/src/agent/Core/SpawningKit/Journey.h +4 -5
- data/src/agent/Core/SpawningKit/PipeWatcher.h +1 -1
- data/src/agent/Core/SpawningKit/Result.h +20 -8
- data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h +1 -1
- data/src/agent/Core/SpawningKit/SmartSpawner.h +6 -6
- data/src/agent/Core/SpawningKit/Spawner.h +2 -2
- data/src/agent/Core/TelemetryCollector.h +13 -7
- data/src/agent/ExecHelper/ExecHelperMain.cpp +1 -1
- data/src/agent/README.md +1 -1
- data/src/agent/Shared/ApiAccountUtils.h +1 -1
- data/src/agent/Shared/ApiServerUtils.h +3 -3
- data/src/agent/Shared/ApplicationPoolApiKey.h +2 -2
- data/src/agent/Shared/Fundamentals/Initialization.cpp +4 -4
- data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +1 -1
- data/src/agent/SystemMetrics/SystemMetricsMain.cpp +4 -3
- data/src/agent/Watchdog/ApiServer.h +3 -3
- data/src/agent/Watchdog/Config.h +3 -2
- data/src/agent/Watchdog/CoreWatcher.cpp +2 -2
- data/src/agent/Watchdog/WatchdogMain.cpp +93 -27
- data/src/apache2_module/Config.cpp +14 -14
- data/src/apache2_module/Config.h +8 -16
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +505 -491
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp.cxxcodebuilder +39 -17
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +24 -1
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp.cxxcodebuilder +31 -1
- data/src/{cxx_supportlib/Utils/MemoryBarrier.h → apache2_module/ConfigGeneral/Common.h} +17 -25
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +12 -1
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder +16 -1
- data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +19 -5
- data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp.cxxcodebuilder +26 -9
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +6 -1
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +10 -1
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -1
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder +11 -1
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +23 -1
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +34 -1
- data/src/apache2_module/Hooks.cpp +3 -3
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +24 -1
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder +36 -1
- data/src/cxx_supportlib/{Utils → Algorithms}/Hasher.cpp +2 -2
- data/src/cxx_supportlib/{Utils → Algorithms}/Hasher.h +4 -4
- data/src/cxx_supportlib/AppTypeDetector/Detector.h +1 -1
- data/src/cxx_supportlib/ConfigKit/Schema.h +2 -2
- data/src/cxx_supportlib/ConfigKit/Store.h +1 -1
- data/src/cxx_supportlib/Constants.h +1 -1
- data/src/cxx_supportlib/{Utils → DataStructures}/HashMap.h +4 -4
- data/src/cxx_supportlib/DataStructures/HashedStaticString.h +5 -5
- data/src/cxx_supportlib/DataStructures/LString.h +3 -3
- data/src/cxx_supportlib/{Utils → DataStructures}/StringMap.h +36 -36
- data/src/cxx_supportlib/FileTools/FileManip.cpp +1 -1
- data/src/cxx_supportlib/FileTools/PathManip.cpp +2 -2
- data/src/cxx_supportlib/FileTools/PathSecurityCheck.cpp +1 -1
- data/src/cxx_supportlib/Hooks.h +2 -2
- data/src/cxx_supportlib/{Utils → IOTools}/BufferedIO.h +5 -5
- data/src/cxx_supportlib/{Utils → IOTools}/IOUtils.cpp +2 -2
- data/src/cxx_supportlib/{Utils → IOTools}/IOUtils.h +3 -3
- data/src/cxx_supportlib/{Utils → IOTools}/MessageIO.h +7 -7
- data/src/cxx_supportlib/{MessageReadersWriters.h → IOTools/MessageSerialization.h} +5 -5
- data/src/cxx_supportlib/InstanceDirectory.h +4 -4
- data/src/cxx_supportlib/Integrations/LibevJsonUtils.h +3 -3
- data/src/cxx_supportlib/{Utils → JsonTools}/JsonUtils.h +5 -5
- data/src/cxx_supportlib/LoggingKit/Context.h +2 -2
- data/src/cxx_supportlib/LoggingKit/Implementation.cpp +3 -3
- data/src/cxx_supportlib/MemoryKit/mbuf.cpp +2 -2
- data/src/cxx_supportlib/ProcessManagement/Spawn.cpp +5 -5
- data/src/cxx_supportlib/ProcessManagement/Utils.h +10 -0
- data/src/cxx_supportlib/RandomGenerator.h +2 -2
- data/src/cxx_supportlib/{Crypto.cpp → SecurityKit/Crypto.cpp} +4 -4
- data/src/cxx_supportlib/{Crypto.h → SecurityKit/Crypto.h} +4 -4
- data/src/cxx_supportlib/{Utils → SecurityKit}/MemZeroGuard.h +0 -0
- data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +2 -2
- data/src/cxx_supportlib/ServerKit/Channel.h +1 -1
- data/src/cxx_supportlib/ServerKit/Context.h +2 -2
- data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +3 -3
- data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +2 -2
- data/src/cxx_supportlib/ServerKit/HttpServer.h +16 -10
- data/src/cxx_supportlib/ServerKit/Server.h +3 -3
- data/src/cxx_supportlib/{Utils → StrIntTools}/DateParsing.h +5 -5
- data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtils.cpp +3 -3
- data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtils.h +0 -0
- data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtilsNoStrictAliasing.cpp +2 -2
- data/src/cxx_supportlib/{Utils → StrIntTools}/StringScanning.h +5 -5
- data/src/cxx_supportlib/{Utils → StrIntTools}/Template.h +30 -5
- data/src/cxx_supportlib/SystemTools/ContainerHelpers.h +34 -0
- data/src/cxx_supportlib/{Utils → SystemTools}/ProcessMetricsCollector.h +6 -6
- data/src/cxx_supportlib/{Utils → SystemTools}/SystemMetricsCollector.h +3 -3
- data/src/cxx_supportlib/{Utils → SystemTools}/SystemTime.cpp +1 -1
- data/src/cxx_supportlib/{Utils → SystemTools}/SystemTime.h +0 -0
- data/src/cxx_supportlib/SystemTools/UserDatabase.h +1 -1
- data/src/cxx_supportlib/Utils.cpp +2 -2
- data/src/cxx_supportlib/Utils/CachedFileStat.hpp +3 -3
- data/src/cxx_supportlib/Utils/Curl.h +2 -2
- data/src/cxx_supportlib/Utils/FileChangeChecker.h +2 -2
- data/src/cxx_supportlib/Utils/MessagePassing.h +1 -1
- data/src/cxx_supportlib/Utils/SpeedMeter.h +2 -2
- data/src/cxx_supportlib/Utils/Timer.h +2 -2
- data/src/cxx_supportlib/Utils/VariantMap.h +3 -3
- data/src/cxx_supportlib/WatchdogLauncher.h +3 -3
- data/src/cxx_supportlib/WebSocketCommandReverseServer.h +1 -1
- data/src/cxx_supportlib/WrapperRegistry/Registry.h +1 -1
- data/src/cxx_supportlib/vendor-modified/psg_sysqueue.h +3 -0
- data/src/ruby_supportlib/phusion_passenger.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +11 -11
- data/src/ruby_supportlib/phusion_passenger/config/agent_compiler.rb +4 -4
- data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/message_channel.rb +2 -2
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +20 -19
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +22 -4
- data/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb +33 -13
- data/src/schema_printer/SchemaPrinterMain.cpp +2 -0
- metadata +28 -86
- data/.editorconfig +0 -134
- data/CODE_OF_CONDUCT.md +0 -52
- data/dev/boost-patches/0001-Patch-boost-thread-so-that-oxt-thread-can-use-it.patch +0 -48
- data/dev/boost-patches/0002-Make-boost-thread_interrupted-derive-from-oxt-tracab.patch +0 -33
- data/dev/boost-patches/0003-Disable-a-Clang-pragma-to-prevent-warnings-on-OS-X.patch +0 -25
- data/dev/ci/README.md +0 -134
- data/dev/ci/lib/functions.sh +0 -129
- data/dev/ci/lib/set-container-envvars.sh +0 -53
- data/dev/ci/lib/setup-container.sh +0 -46
- data/dev/ci/run-tests-natively +0 -24
- data/dev/ci/run-tests-with-docker +0 -42
- data/dev/ci/scripts/debug-console-wrapper.sh +0 -29
- data/dev/ci/scripts/docker-entrypoint-stage2.sh +0 -17
- data/dev/ci/scripts/docker-entrypoint.sh +0 -17
- data/dev/ci/scripts/inituidgid +0 -17
- data/dev/ci/scripts/run-tests-natively-stage2.sh +0 -17
- data/dev/ci/scripts/setup-host-natively.sh +0 -11
- data/dev/ci/setup-host +0 -56
- data/dev/ci/tests/apache2/run +0 -6
- data/dev/ci/tests/apache2/setup +0 -4
- data/dev/ci/tests/binaries/Jenkinsfile +0 -105
- data/dev/ci/tests/binaries/build-linux +0 -38
- data/dev/ci/tests/binaries/build-macos +0 -40
- data/dev/ci/tests/binaries/prepare-macos +0 -38
- data/dev/ci/tests/binaries/test-linux +0 -45
- data/dev/ci/tests/binaries/test-macos +0 -38
- data/dev/ci/tests/cxx/run +0 -9
- data/dev/ci/tests/cxx/setup +0 -4
- data/dev/ci/tests/debian/Jenkinsfile +0 -89
- data/dev/ci/tests/debian/run +0 -60
- data/dev/ci/tests/nginx-dynamic/run +0 -20
- data/dev/ci/tests/nginx-dynamic/setup +0 -4
- data/dev/ci/tests/nginx/run +0 -5
- data/dev/ci/tests/nginx/setup +0 -4
- data/dev/ci/tests/nodejs/run +0 -4
- data/dev/ci/tests/nodejs/setup +0 -4
- data/dev/ci/tests/rpm/Jenkinsfile +0 -68
- data/dev/ci/tests/rpm/run +0 -63
- data/dev/ci/tests/ruby/run +0 -4
- data/dev/ci/tests/ruby/setup +0 -4
- data/dev/ci/tests/source-packaging/run +0 -4
- data/dev/ci/tests/source-packaging/setup +0 -4
- data/dev/ci/tests/standalone/run +0 -4
- data/dev/ci/tests/standalone/setup +0 -4
- data/dev/configkit-schemas/index.json +0 -1850
- data/dev/configkit-schemas/update_schema_inline_comments.rb +0 -118
- data/dev/rack.test/config.ru +0 -5
- data/dev/rack.test/public/asset.txt +0 -1
- data/dev/vagrant/apache_default_site.conf +0 -35
- data/dev/vagrant/apache_passenger.conf +0 -5
- data/dev/vagrant/apache_passenger.load +0 -1
- data/dev/vagrant/apache_ports.conf +0 -24
- data/dev/vagrant/apache_rack_test.conf +0 -9
- data/dev/vagrant/bashrc +0 -23
- data/dev/vagrant/nginx.conf +0 -39
- data/dev/vagrant/nginx_rakefile +0 -33
- data/dev/vagrant/nginx_start +0 -32
- data/dev/vagrant/provision.sh +0 -117
- data/dev/vagrant/sudoers.conf +0 -5
- data/resources/templates/error_renderer/.editorconfig +0 -19
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2014-
|
3
|
+
* Copyright (c) 2014-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.
|
@@ -36,7 +36,7 @@
|
|
36
36
|
#include <SafeLibev.h>
|
37
37
|
#include <Exceptions.h>
|
38
38
|
#include <Utils.h>
|
39
|
-
#include <
|
39
|
+
#include <JsonTools/JsonUtils.h>
|
40
40
|
|
41
41
|
extern "C" {
|
42
42
|
struct uv_loop_s;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2014-
|
3
|
+
* Copyright (c) 2014-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.
|
@@ -38,8 +38,8 @@
|
|
38
38
|
#include <DataStructures/LString.h>
|
39
39
|
#include <DataStructures/HashedStaticString.h>
|
40
40
|
#include <LoggingKit/LoggingKit.h>
|
41
|
-
#include <
|
42
|
-
#include <
|
41
|
+
#include <StrIntTools/StrIntUtils.h>
|
42
|
+
#include <Algorithms/Hasher.h>
|
43
43
|
|
44
44
|
namespace Passenger {
|
45
45
|
namespace ServerKit {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2014-
|
3
|
+
* Copyright (c) 2014-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.
|
@@ -27,7 +27,7 @@
|
|
27
27
|
#define _PASSENGER_SERVER_KIT_HTTP_HEADER_PARSER_STATE_H_
|
28
28
|
|
29
29
|
#include <DataStructures/LString.h>
|
30
|
-
#include <
|
30
|
+
#include <Algorithms/Hasher.h>
|
31
31
|
|
32
32
|
namespace Passenger {
|
33
33
|
namespace ServerKit {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2014-
|
3
|
+
* Copyright (c) 2014-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.
|
@@ -44,11 +44,11 @@
|
|
44
44
|
#include <ServerKit/HttpChunkedBodyParser.h>
|
45
45
|
#include <Algorithms/MovingAverage.h>
|
46
46
|
#include <Integrations/LibevJsonUtils.h>
|
47
|
-
#include <
|
48
|
-
#include <
|
47
|
+
#include <SystemTools/SystemTime.h>
|
48
|
+
#include <StrIntTools/StrIntUtils.h>
|
49
49
|
#include <Utils/HttpConstants.h>
|
50
|
-
#include <
|
51
|
-
#include <
|
50
|
+
#include <Algorithms/Hasher.h>
|
51
|
+
#include <SystemTools/SystemTime.h>
|
52
52
|
|
53
53
|
namespace Passenger {
|
54
54
|
namespace ServerKit {
|
@@ -329,10 +329,8 @@ private:
|
|
329
329
|
SKC_TRACE(client, 3, "Parsing " << buffer.size() <<
|
330
330
|
" bytes of HTTP header: \"" << cEscapeString(StaticString(
|
331
331
|
buffer.start, buffer.size())) << "\"");
|
332
|
-
|
333
|
-
|
334
|
-
feed(buffer);
|
335
|
-
}
|
332
|
+
ret = createRequestHeaderParser(this->getContext(), req).
|
333
|
+
feed(buffer);
|
336
334
|
if (req->httpState == Request::PARSING_HEADERS) {
|
337
335
|
// Not yet done parsing.
|
338
336
|
return Channel::Result(buffer.size(), false);
|
@@ -417,6 +415,9 @@ private:
|
|
417
415
|
assert(maxRemaining > 0);
|
418
416
|
remaining = std::min<boost::uint64_t>(buffer.size(), maxRemaining);
|
419
417
|
req->bodyAlreadyRead += remaining;
|
418
|
+
SKC_TRACE(client, 3, "Event comes with " << buffer.size() <<
|
419
|
+
" bytes of fixed-length HTTP request body: \"" << cEscapeString(StaticString(
|
420
|
+
buffer.start, buffer.size())) << "\"");
|
420
421
|
SKC_TRACE(client, 3, "Request body: " <<
|
421
422
|
req->bodyAlreadyRead << " of " <<
|
422
423
|
req->aux.bodyInfo.contentLength << " bytes already read");
|
@@ -474,6 +475,9 @@ private:
|
|
474
475
|
}
|
475
476
|
}
|
476
477
|
|
478
|
+
SKC_TRACE(client, 3, "Event comes with " << buffer.size() <<
|
479
|
+
" bytes of chunked HTTP request body: \"" << cEscapeString(StaticString(
|
480
|
+
buffer.start, buffer.size())) << "\"");
|
477
481
|
HttpChunkedEvent event(createChunkedBodyParser(req).feed(buffer));
|
478
482
|
req->bodyAlreadyRead += event.consumed;
|
479
483
|
|
@@ -512,7 +516,6 @@ private:
|
|
512
516
|
return Channel::Result(event.consumed, false);
|
513
517
|
case HttpChunkedEvent::ERROR:
|
514
518
|
assert(event.end);
|
515
|
-
P_ASSERT_EQ(event.consumed, 0);
|
516
519
|
client->input.stop();
|
517
520
|
req->wantKeepAlive = false;
|
518
521
|
req->bodyChannel.feedError(event.errcode);
|
@@ -553,6 +556,9 @@ private:
|
|
553
556
|
}
|
554
557
|
}
|
555
558
|
|
559
|
+
SKC_TRACE(client, 3, "Event comes with " << buffer.size() <<
|
560
|
+
" bytes of upgraded HTTP request body: \"" << cEscapeString(StaticString(
|
561
|
+
buffer.start, buffer.size())) << "\"");
|
556
562
|
req->bodyAlreadyRead += buffer.size();
|
557
563
|
req->bodyChannel.feed(buffer);
|
558
564
|
if (!req->ended()) {
|
@@ -68,9 +68,9 @@
|
|
68
68
|
#include <Algorithms/MovingAverage.h>
|
69
69
|
#include <Utils.h>
|
70
70
|
#include <Utils/ScopeGuard.h>
|
71
|
-
#include <
|
72
|
-
#include <
|
73
|
-
#include <
|
71
|
+
#include <StrIntTools/StrIntUtils.h>
|
72
|
+
#include <IOTools/IOUtils.h>
|
73
|
+
#include <SystemTools/SystemTime.h>
|
74
74
|
|
75
75
|
namespace Passenger {
|
76
76
|
namespace ServerKit {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2014-
|
3
|
+
* Copyright (c) 2014-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.
|
@@ -23,15 +23,15 @@
|
|
23
23
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
24
|
* THE SOFTWARE.
|
25
25
|
*/
|
26
|
-
#ifndef
|
27
|
-
#define
|
26
|
+
#ifndef _PASSENGER_STRINTTOOLS_DATE_PARSING_H_
|
27
|
+
#define _PASSENGER_STRINTTOOLS_DATE_PARSING_H_
|
28
28
|
|
29
29
|
#include <algorithm>
|
30
30
|
#include <time.h>
|
31
31
|
#include <cassert>
|
32
32
|
#include <cstring>
|
33
33
|
#include <StaticString.h>
|
34
|
-
#include <
|
34
|
+
#include <StrIntTools/StrIntUtils.h>
|
35
35
|
|
36
36
|
namespace Passenger {
|
37
37
|
|
@@ -404,4 +404,4 @@ parseImfFixdate_zone(const char **pos, const char *end, int &zone) {
|
|
404
404
|
|
405
405
|
} // namespace Passenger
|
406
406
|
|
407
|
-
#endif /*
|
407
|
+
#endif /* _PASSENGER_STRINTTOOLS_DATE_PARSING_H_ */
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2010-
|
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.
|
@@ -33,8 +33,8 @@
|
|
33
33
|
#include <utf8.h>
|
34
34
|
#include <algorithm>
|
35
35
|
#include <Exceptions.h>
|
36
|
-
#include <
|
37
|
-
#include <
|
36
|
+
#include <SystemTools/SystemTime.h>
|
37
|
+
#include <StrIntTools/StrIntUtils.h>
|
38
38
|
|
39
39
|
namespace Passenger {
|
40
40
|
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2014-
|
3
|
+
* Copyright (c) 2014-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.
|
@@ -27,7 +27,7 @@
|
|
27
27
|
#include <boost/cstdint.hpp>
|
28
28
|
#include <cstddef>
|
29
29
|
#include <oxt/macros.hpp>
|
30
|
-
#include <
|
30
|
+
#include <StrIntTools/StrIntUtils.h>
|
31
31
|
|
32
32
|
namespace Passenger {
|
33
33
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2013-
|
3
|
+
* Copyright (c) 2013-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.
|
@@ -23,14 +23,14 @@
|
|
23
23
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
24
|
* THE SOFTWARE.
|
25
25
|
*/
|
26
|
-
#ifndef
|
27
|
-
#define
|
26
|
+
#ifndef _PASSENGER_STR_INT_TOOLS_STRING_SCANNING_H_
|
27
|
+
#define _PASSENGER_STR_INT_TOOLS_STRING_SCANNING_H_
|
28
28
|
|
29
29
|
#include <cstring>
|
30
30
|
#include <cstdlib>
|
31
31
|
#include <string>
|
32
32
|
#include <StaticString.h>
|
33
|
-
#include <
|
33
|
+
#include <StrIntTools/StrIntUtils.h>
|
34
34
|
|
35
35
|
|
36
36
|
/**
|
@@ -269,4 +269,4 @@ readNextSentence(const char **data, char terminator) {
|
|
269
269
|
|
270
270
|
} // namespace Passenger
|
271
271
|
|
272
|
-
#endif /*
|
272
|
+
#endif /* _PASSENGER_STR_INT_TOOLS_TEMPLATE_H_ */
|
@@ -1,12 +1,37 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
/*
|
2
|
+
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
+
* Copyright (c) 2013-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_STR_INT_TOOLS_TEMPLATE_H_
|
27
|
+
#define _PASSENGER_STR_INT_TOOLS_TEMPLATE_H_
|
3
28
|
|
4
29
|
#include <string>
|
5
30
|
#include <cstring>
|
6
31
|
#include <cstdio>
|
7
32
|
#include <StaticString.h>
|
8
|
-
#include <
|
9
|
-
#include <
|
33
|
+
#include <StrIntTools/StrIntUtils.h>
|
34
|
+
#include <DataStructures/StringMap.h>
|
10
35
|
|
11
36
|
namespace Passenger {
|
12
37
|
|
@@ -209,4 +234,4 @@ public:
|
|
209
234
|
|
210
235
|
} // namespace Passenger
|
211
236
|
|
212
|
-
#endif /*
|
237
|
+
#endif /* _PASSENGER_STR_INT_TOOLS_TEMPLATE_H_ */
|
@@ -0,0 +1,34 @@
|
|
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
|
+
* See LICENSE file for license information.
|
9
|
+
*/
|
10
|
+
#ifndef _PASSENGER_SYSTEM_TOOLS_CONTAINER_HELPERS_H_
|
11
|
+
#define _PASSENGER_SYSTEM_TOOLS_CONTAINER_HELPERS_H_
|
12
|
+
|
13
|
+
#include <boost/predef.h>
|
14
|
+
#include <FileTools/FileManip.h>
|
15
|
+
|
16
|
+
namespace Passenger {
|
17
|
+
|
18
|
+
using namespace std;
|
19
|
+
|
20
|
+
|
21
|
+
inline bool
|
22
|
+
autoDetectInContainer() {
|
23
|
+
#if BOOST_OS_LINUX
|
24
|
+
// https://github.com/moby/moby/issues/26102#issuecomment-253621560
|
25
|
+
return fileExists("/.dockerenv");
|
26
|
+
#else
|
27
|
+
return false;
|
28
|
+
#endif
|
29
|
+
}
|
30
|
+
|
31
|
+
|
32
|
+
} // namespace Passenger
|
33
|
+
|
34
|
+
#endif /* _PASSENGER_SYSTEM_TOOLS_CONTAINER_HELPERS_H_ */
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2010-
|
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.
|
@@ -23,8 +23,8 @@
|
|
23
23
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
24
|
* THE SOFTWARE.
|
25
25
|
*/
|
26
|
-
#ifndef
|
27
|
-
#define
|
26
|
+
#ifndef _PASSENGER_SYSTEM_TOOLS_PROCESS_METRICS_COLLECTOR_H_
|
27
|
+
#define _PASSENGER_SYSTEM_TOOLS_PROCESS_METRICS_COLLECTOR_H_
|
28
28
|
|
29
29
|
#include <boost/cstdint.hpp>
|
30
30
|
#include <boost/thread.hpp>
|
@@ -63,8 +63,8 @@
|
|
63
63
|
#include <ProcessManagement/Spawn.h>
|
64
64
|
#include <FileTools/FileManip.h>
|
65
65
|
#include <Utils/ScopeGuard.h>
|
66
|
-
#include <
|
67
|
-
#include <
|
66
|
+
#include <IOTools/IOUtils.h>
|
67
|
+
#include <StrIntTools/StringScanning.h>
|
68
68
|
|
69
69
|
namespace Passenger {
|
70
70
|
|
@@ -505,4 +505,4 @@ public:
|
|
505
505
|
|
506
506
|
} // namespace Passenger
|
507
507
|
|
508
|
-
#endif /*
|
508
|
+
#endif /* _PASSENGER_SYSTEM_TOOLS_PROCESS_METRICS_COLLECTOR_H_ */
|
@@ -46,7 +46,7 @@
|
|
46
46
|
#include <sys/sysinfo.h>
|
47
47
|
#include <Exceptions.h>
|
48
48
|
#include <FileTools/FileManip.h>
|
49
|
-
#include <
|
49
|
+
#include <StrIntTools/StringScanning.h>
|
50
50
|
#endif
|
51
51
|
#ifdef __APPLE__
|
52
52
|
#include <mach/mach.h>
|
@@ -65,8 +65,8 @@
|
|
65
65
|
#include <Constants.h>
|
66
66
|
#include <StaticString.h>
|
67
67
|
#include <Utils.h>
|
68
|
-
#include <
|
69
|
-
#include <
|
68
|
+
#include <StrIntTools/StrIntUtils.h>
|
69
|
+
#include <SystemTools/SystemTime.h>
|
70
70
|
#include <Utils/AnsiColorConstants.h>
|
71
71
|
#include <Utils/SpeedMeter.h>
|
72
72
|
|
File without changes
|
@@ -57,8 +57,8 @@
|
|
57
57
|
#include <ProcessManagement/Spawn.h>
|
58
58
|
#include <ProcessManagement/Utils.h>
|
59
59
|
#include <Utils.h>
|
60
|
-
#include <
|
61
|
-
#include <
|
60
|
+
#include <StrIntTools/StrIntUtils.h>
|
61
|
+
#include <IOTools/IOUtils.h>
|
62
62
|
|
63
63
|
#ifndef HOST_NAME_MAX
|
64
64
|
#if defined(_POSIX_HOST_NAME_MAX)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2010-
|
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.
|
@@ -39,8 +39,8 @@
|
|
39
39
|
#include <oxt/system_calls.hpp>
|
40
40
|
|
41
41
|
#include <StaticString.h>
|
42
|
-
#include <
|
43
|
-
#include <
|
42
|
+
#include <SystemTools/SystemTime.h>
|
43
|
+
#include <DataStructures/StringMap.h>
|
44
44
|
|
45
45
|
namespace Passenger {
|
46
46
|
|