passenger 6.2.0 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +33 -1
- data/CONTRIBUTING.md +7 -311
- data/CONTRIBUTORS +1 -0
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/bin/passenger +1 -1
- data/bin/passenger-config +1 -1
- data/bin/passenger-install-apache2-module +1 -1
- data/bin/passenger-install-nginx-module +4 -9
- data/bin/passenger-memory-stats +1 -1
- data/bin/passenger-status +1 -1
- data/build/agent.rb +13 -15
- data/build/apache2.rb +13 -16
- data/build/basics.rb +10 -13
- data/build/common_library.rb +5 -9
- data/build/cxx_tests.rb +37 -12
- data/build/integration_tests.rb +5 -2
- data/build/misc.rb +1 -1
- data/build/nginx.rb +1 -1
- data/build/node_tests.rb +1 -1
- data/build/oxt_tests.rb +6 -8
- data/build/packaging.rb +1 -1
- data/build/ruby_extension.rb +1 -1
- data/build/ruby_tests.rb +1 -1
- data/build/schema_printer.rb +13 -15
- data/build/support/cplusplus.rb +61 -69
- data/build/support/cxx_dependency_map.rb +2 -1
- data/build/support/general.rb +1 -1
- data/build/support/vendor/cxx_hinted_parser/LICENSE.md +1 -1
- data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser/parser.rb +1 -1
- data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser.rb +1 -1
- data/build/support/vendor/cxxcodebuilder/LICENSE.md +1 -1
- data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/builder.rb +1 -1
- data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/initializer_builder.rb +1 -1
- data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder.rb +1 -1
- data/build/test_basics.rb +1 -1
- data/dev/copy_boost_headers +1 -1
- data/dev/index_cxx_dependencies.rb +5 -1
- data/dev/libev-changes.patch +108 -0
- data/dev/nginx_version_sha256 +1 -1
- data/dev/ruby_server.rb +1 -6
- data/dev/upgrading_libuv.sh +16 -0
- data/doc/BasicArchitectureOverview.md +55 -0
- data/doc/BuildCaching.md +23 -0
- data/doc/BuildSystem.md +49 -0
- data/doc/DebuggingAndStressTesting.md +2 -0
- data/doc/DesignAspects/LimitedGemDependencies.md +1 -0
- data/doc/DevEnvironmentSetup.md +46 -0
- data/doc/DevHandbook.md +28 -0
- data/doc/Packaging.md +1 -1
- data/doc/RunningTests.md +88 -0
- data/doc/{TempFileHandling.md → SecureTempFileHandling.md} +1 -1
- data/doc/{CxxTestingGuide.md → WritingCxxTests.md} +1 -20
- data/src/agent/AgentMain.cpp +1 -1
- data/src/agent/Core/ApiServer.h +1 -1
- data/src/agent/Core/ApplicationPool/AbstractSession.h +1 -1
- data/src/agent/Core/ApplicationPool/BasicGroupInfo.h +1 -1
- data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +1 -1
- data/src/agent/Core/ApplicationPool/Common.h +1 -1
- data/src/agent/Core/ApplicationPool/Context.h +1 -1
- data/src/agent/Core/ApplicationPool/Group/InitializationAndShutdown.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/LifetimeAndBasics.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/Miscellaneous.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/SessionManagement.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/SpawningAndRestarting.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/Verification.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group.h +1 -1
- data/src/agent/Core/ApplicationPool/Implementation.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Options.h +1 -1
- data/src/agent/Core/ApplicationPool/Pool/AnalyticsCollection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/GroupUtils.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/ProcessUtils.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool.h +1 -1
- data/src/agent/Core/ApplicationPool/Process.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Process.h +1 -1
- data/src/agent/Core/ApplicationPool/Session.h +1 -1
- data/src/agent/Core/ApplicationPool/Socket.h +1 -1
- data/src/agent/Core/ApplicationPool/TestSession.h +1 -1
- data/src/agent/Core/Config.h +3 -2
- data/src/agent/Core/ConfigChange.cpp +1 -1
- data/src/agent/Core/ConfigChange.h +1 -1
- data/src/agent/Core/Controller/AppResponse.h +1 -1
- data/src/agent/Core/Controller/BufferBody.cpp +1 -1
- data/src/agent/Core/Controller/CheckoutSession.cpp +8 -5
- data/src/agent/Core/Controller/Client.h +1 -1
- data/src/agent/Core/Controller/Config.cpp +1 -1
- data/src/agent/Core/Controller/Config.h +2 -2
- data/src/agent/Core/Controller/ForwardResponse.cpp +2 -2
- data/src/agent/Core/Controller/Hooks.cpp +12 -9
- data/src/agent/Core/Controller/Implementation.cpp +1 -1
- data/src/agent/Core/Controller/InitRequest.cpp +1 -1
- data/src/agent/Core/Controller/InitializationAndShutdown.cpp +1 -1
- data/src/agent/Core/Controller/InternalUtils.cpp +1 -1
- data/src/agent/Core/Controller/Miscellaneous.cpp +1 -1
- data/src/agent/Core/Controller/Request.h +1 -1
- data/src/agent/Core/Controller/SendRequest.cpp +1 -1
- data/src/agent/Core/Controller/StateInspection.cpp +1 -1
- data/src/agent/Core/Controller/TurboCaching.h +1 -1
- data/src/agent/Core/Controller.h +1 -1
- data/src/agent/Core/CoreMain.cpp +1 -1
- data/src/agent/Core/OptionParser.h +1 -1
- data/src/agent/Core/ResponseCache.h +1 -1
- data/src/agent/Core/SecurityUpdateChecker.h +1 -1
- data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +1 -1
- data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h.cxxcodebuilder +1 -1
- data/src/agent/Core/SpawningKit/Config.h +1 -1
- data/src/agent/Core/SpawningKit/Context.h +1 -1
- data/src/agent/Core/SpawningKit/DirectSpawner.h +1 -1
- data/src/agent/Core/SpawningKit/DummySpawner.h +1 -1
- data/src/agent/Core/SpawningKit/ErrorRenderer.h +1 -1
- data/src/agent/Core/SpawningKit/Exceptions.h +63 -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 +3 -2
- data/src/agent/Core/SpawningKit/Handshake/Prepare.h +1 -1
- data/src/agent/Core/SpawningKit/Handshake/Session.h +1 -1
- data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +1 -1
- data/src/agent/Core/SpawningKit/Journey.h +1 -1
- data/src/agent/Core/SpawningKit/PipeWatcher.h +1 -1
- data/src/agent/Core/SpawningKit/README.md +3 -3
- data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h +1 -1
- data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h.cxxcodebuilder +1 -1
- data/src/agent/Core/SpawningKit/Result.h +1 -1
- data/src/agent/Core/SpawningKit/SmartSpawner.h +17 -17
- data/src/agent/Core/SpawningKit/Spawner.h +1 -1
- data/src/agent/Core/SpawningKit/UserSwitchingRules.h +1 -1
- data/src/agent/Core/TelemetryCollector.h +1 -1
- data/src/agent/ExecHelper/ExecHelperMain.cpp +1 -1
- data/src/agent/FileReadHelper/FileReadHelperMain.cpp +1 -1
- data/src/agent/MainFunctions.h +1 -1
- data/src/agent/Shared/ApiAccountUtils.h +4 -3
- data/src/agent/Shared/ApiServerUtils.h +1 -2
- data/src/agent/Shared/ApplicationPoolApiKey.h +1 -1
- data/src/agent/Shared/Fundamentals/AbortHandler.cpp +1 -1
- data/src/agent/Shared/Fundamentals/AbortHandler.h +1 -1
- data/src/agent/Shared/Fundamentals/Initialization.cpp +1 -1
- data/src/agent/Shared/Fundamentals/Initialization.h +1 -1
- data/src/agent/Shared/Fundamentals/Utils.cpp +1 -1
- data/src/agent/Shared/Fundamentals/Utils.h +1 -1
- data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +1 -1
- data/src/agent/SystemMetrics/SystemMetricsMain.cpp +1 -1
- data/src/agent/TempDirToucher/TempDirToucherMain.cpp +1 -1
- data/src/agent/Watchdog/ApiServer.h +7 -6
- data/src/agent/Watchdog/Config.h +2 -2
- data/src/apache2_module/Bucket.cpp +1 -1
- data/src/apache2_module/Bucket.h +1 -1
- data/src/apache2_module/CBindings.cpp +1 -1
- data/src/apache2_module/Config.cpp +1 -1
- data/src/apache2_module/Config.h +1 -1
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +104 -104
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp.cxxcodebuilder +2 -2
- data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +1 -1
- data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +1 -1
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/ConfigGeneral/Common.h +1 -1
- data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +1 -1
- data/src/apache2_module/ConfigGeneral/SetterFuncs.h +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +1 -1
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
- data/src/apache2_module/DirectoryMapper.h +1 -1
- data/src/apache2_module/Hooks.cpp +8 -2
- data/src/apache2_module/Hooks.h +1 -1
- data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +1 -1
- data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +1 -1
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +1 -1
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
- data/src/apache2_module/Utils.h +1 -1
- data/src/apache2_module/mod_passenger.c +1 -1
- data/src/cxx_supportlib/Algorithms/Hasher.cpp +1 -1
- data/src/cxx_supportlib/Algorithms/Hasher.h +1 -1
- data/src/cxx_supportlib/Algorithms/MovingAverage.h +1 -1
- data/src/cxx_supportlib/AppLocalConfigFileUtils.h +1 -1
- data/src/cxx_supportlib/AppTypeDetector/CBindings.cpp +1 -1
- data/src/cxx_supportlib/AppTypeDetector/CBindings.h +1 -1
- data/src/cxx_supportlib/AppTypeDetector/Detector.h +1 -1
- data/src/cxx_supportlib/BackgroundEventLoop.cpp +1 -1
- data/src/cxx_supportlib/BackgroundEventLoop.h +1 -1
- data/src/cxx_supportlib/ConfigKit/AsyncUtils.h +1 -1
- data/src/cxx_supportlib/ConfigKit/Common.h +1 -1
- data/src/cxx_supportlib/ConfigKit/ConfigKit.h +1 -1
- data/src/cxx_supportlib/ConfigKit/DummyTranslator.h +1 -1
- data/src/cxx_supportlib/ConfigKit/IN_PRACTICE.md +1 -3
- data/src/cxx_supportlib/ConfigKit/PrefixTranslator.h +3 -3
- data/src/cxx_supportlib/ConfigKit/Schema.h +1 -1
- data/src/cxx_supportlib/ConfigKit/SchemaUtils.h +1 -1
- data/src/cxx_supportlib/ConfigKit/Store.h +1 -1
- data/src/cxx_supportlib/ConfigKit/SubComponentUtils.h +1 -1
- data/src/cxx_supportlib/ConfigKit/TableTranslator.h +1 -1
- data/src/cxx_supportlib/ConfigKit/Translator.h +1 -1
- data/src/cxx_supportlib/ConfigKit/Utils.h +1 -1
- data/src/cxx_supportlib/Constants.h +2 -2
- data/src/cxx_supportlib/Constants.h.cxxcodebuilder +1 -1
- data/src/cxx_supportlib/DataStructures/HashedStaticString.h +1 -1
- data/src/cxx_supportlib/DataStructures/LString.cpp +1 -1
- data/src/cxx_supportlib/DataStructures/LString.h +1 -1
- data/src/cxx_supportlib/DataStructures/StringKeyTable.h +1 -1
- data/src/cxx_supportlib/DataStructures/StringMap.h +1 -1
- data/src/cxx_supportlib/Exceptions.cpp +1 -1
- data/src/cxx_supportlib/Exceptions.h +1 -1
- data/src/cxx_supportlib/FileDescriptor.h +1 -1
- data/src/cxx_supportlib/FileTools/FileManip.cpp +1 -1
- data/src/cxx_supportlib/FileTools/FileManip.h +1 -1
- data/src/cxx_supportlib/FileTools/PathManip.cpp +1 -1
- data/src/cxx_supportlib/FileTools/PathManip.h +1 -1
- data/src/cxx_supportlib/FileTools/PathManipCBindings.cpp +1 -1
- data/src/cxx_supportlib/FileTools/PathManipCBindings.h +1 -1
- data/src/cxx_supportlib/FileTools/PathSecurityCheck.cpp +1 -1
- data/src/cxx_supportlib/FileTools/PathSecurityCheck.h +1 -1
- data/src/cxx_supportlib/Hooks.h +1 -1
- data/src/cxx_supportlib/IOTools/BufferedIO.h +1 -1
- data/src/cxx_supportlib/IOTools/IOUtils.cpp +10 -10
- data/src/cxx_supportlib/IOTools/IOUtils.h +1 -1
- data/src/cxx_supportlib/IOTools/MessageIO.h +1 -1
- data/src/cxx_supportlib/IOTools/MessageSerialization.h +1 -1
- data/src/cxx_supportlib/InstanceDirectory.h +1 -1
- data/src/cxx_supportlib/Integrations/LibevJsonUtils.h +1 -1
- data/src/cxx_supportlib/JsonTools/Autocast.h +1 -1
- data/src/cxx_supportlib/JsonTools/CBindings.cpp +1 -1
- data/src/cxx_supportlib/JsonTools/CBindings.h +1 -1
- data/src/cxx_supportlib/JsonTools/JsonUtils.h +1 -1
- data/src/cxx_supportlib/LoggingKit/Assert.h +1 -1
- data/src/cxx_supportlib/LoggingKit/Config.h +2 -1
- data/src/cxx_supportlib/LoggingKit/Context.h +1 -1
- data/src/cxx_supportlib/LoggingKit/Forward.h +1 -1
- data/src/cxx_supportlib/LoggingKit/Implementation.cpp +11 -1
- data/src/cxx_supportlib/LoggingKit/Logging.h +1 -1
- data/src/cxx_supportlib/LoggingKit/LoggingKit.h +1 -1
- data/src/cxx_supportlib/LveLoggingDecorator.h +1 -1
- data/src/cxx_supportlib/MemoryKit/mbuf.cpp +1 -1
- data/src/cxx_supportlib/MemoryKit/mbuf.h +1 -1
- data/src/cxx_supportlib/MemoryKit/palloc.cpp +1 -1
- data/src/cxx_supportlib/MemoryKit/palloc.h +1 -1
- data/src/cxx_supportlib/ProcessManagement/Ruby.cpp +1 -1
- data/src/cxx_supportlib/ProcessManagement/Ruby.h +1 -1
- data/src/cxx_supportlib/ProcessManagement/Spawn.cpp +1 -1
- data/src/cxx_supportlib/ProcessManagement/Spawn.h +1 -1
- data/src/cxx_supportlib/ProcessManagement/Utils.cpp +1 -1
- data/src/cxx_supportlib/ProcessManagement/Utils.h +1 -1
- data/src/cxx_supportlib/RandomGenerator.h +1 -1
- data/src/cxx_supportlib/ResourceLocator.h +1 -1
- data/src/cxx_supportlib/SafeLibev.h +1 -1
- data/src/cxx_supportlib/SecurityKit/Crypto.cpp +9 -27
- data/src/cxx_supportlib/SecurityKit/Crypto.h +2 -2
- data/src/cxx_supportlib/SecurityKit/MemZeroGuard.h +1 -1
- data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +1 -1
- data/src/cxx_supportlib/ServerKit/Channel.h +1 -1
- data/src/cxx_supportlib/ServerKit/Client.h +1 -1
- data/src/cxx_supportlib/ServerKit/ClientRef.h +1 -1
- data/src/cxx_supportlib/ServerKit/Config.h +1 -1
- data/src/cxx_supportlib/ServerKit/Context.h +1 -1
- data/src/cxx_supportlib/ServerKit/CookieUtils.h +1 -1
- data/src/cxx_supportlib/ServerKit/Errors.h +1 -1
- data/src/cxx_supportlib/ServerKit/FdSinkChannel.h +1 -1
- data/src/cxx_supportlib/ServerKit/FdSourceChannel.h +1 -1
- data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +54 -2
- data/src/cxx_supportlib/ServerKit/FileBufferedFdSinkChannel.h +1 -1
- data/src/cxx_supportlib/ServerKit/HeaderTable.h +1 -1
- data/src/cxx_supportlib/ServerKit/Hooks.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpChunkedBodyParser.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpChunkedBodyParserState.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpClient.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpRequest.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpRequestRef.h +1 -1
- data/src/cxx_supportlib/ServerKit/HttpServer.h +1 -1
- data/src/cxx_supportlib/ServerKit/Implementation.cpp +1 -1
- data/src/cxx_supportlib/ServerKit/Server.h +4 -2
- data/src/cxx_supportlib/StaticString.h +1 -1
- data/src/cxx_supportlib/StrIntTools/DateParsing.h +1 -1
- data/src/cxx_supportlib/StrIntTools/StrIntUtils.cpp +1 -1
- data/src/cxx_supportlib/StrIntTools/StrIntUtils.h +1 -1
- data/src/cxx_supportlib/StrIntTools/StrIntUtilsNoStrictAliasing.cpp +1 -1
- data/src/cxx_supportlib/StrIntTools/StringScanning.h +1 -1
- data/src/cxx_supportlib/StrIntTools/Template.h +1 -1
- data/src/cxx_supportlib/SystemTools/ContainerHelpers.h +1 -1
- data/src/cxx_supportlib/SystemTools/ProcessMetricsCollector.h +1 -1
- data/src/cxx_supportlib/SystemTools/SystemMetricsCollector.h +1 -1
- data/src/cxx_supportlib/SystemTools/SystemTime.cpp +1 -1
- data/src/cxx_supportlib/SystemTools/SystemTime.h +1 -1
- data/src/cxx_supportlib/SystemTools/UserDatabase.cpp +1 -1
- data/src/cxx_supportlib/SystemTools/UserDatabase.h +1 -1
- data/src/cxx_supportlib/Utils/AnsiColorConstants.h +1 -1
- data/src/cxx_supportlib/Utils/AsyncSignalSafeUtils.h +1 -1
- data/src/cxx_supportlib/Utils/BlockingQueue.h +1 -1
- data/src/cxx_supportlib/Utils/CachedFileStat.cpp +1 -1
- data/src/cxx_supportlib/Utils/CachedFileStat.h +1 -1
- data/src/cxx_supportlib/Utils/CachedFileStat.hpp +1 -1
- data/src/cxx_supportlib/Utils/ClassUtils.h +1 -1
- data/src/cxx_supportlib/Utils/Curl.h +1 -1
- data/src/cxx_supportlib/Utils/FastStringStream.h +1 -1
- data/src/cxx_supportlib/Utils/FileChangeChecker.h +1 -1
- data/src/cxx_supportlib/Utils/HttpConstants.h +1 -1
- data/src/cxx_supportlib/Utils/IniFile.h +1 -1
- data/src/cxx_supportlib/Utils/MessagePassing.h +1 -1
- data/src/cxx_supportlib/Utils/OptionParsing.h +1 -1
- data/src/cxx_supportlib/Utils/ReleaseableScopedPointer.h +1 -1
- data/src/cxx_supportlib/Utils/ScopeGuard.h +1 -1
- data/src/cxx_supportlib/Utils/SpeedMeter.h +1 -1
- data/src/cxx_supportlib/Utils/Timer.h +1 -1
- data/src/cxx_supportlib/Utils/VariantMap.h +1 -1
- data/src/cxx_supportlib/Utils.cpp +1 -1
- data/src/cxx_supportlib/Utils.h +1 -1
- data/src/cxx_supportlib/WatchdogLauncher.cpp +1 -1
- data/src/cxx_supportlib/WatchdogLauncher.h +1 -1
- data/src/cxx_supportlib/WrapperRegistry/CBindings.cpp +1 -1
- data/src/cxx_supportlib/WrapperRegistry/CBindings.h +1 -1
- data/src/cxx_supportlib/WrapperRegistry/Entry.h +1 -1
- data/src/cxx_supportlib/WrapperRegistry/Registry.h +1 -1
- data/src/cxx_supportlib/oxt/backtrace.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/backtrace_disabled.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/backtrace_enabled.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/context.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/tracable_exception_disabled.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/tracable_exception_enabled.hpp +1 -1
- data/src/cxx_supportlib/oxt/dynamic_thread_group.hpp +1 -1
- data/src/cxx_supportlib/oxt/implementation.cpp +1 -1
- data/src/cxx_supportlib/oxt/initialize.hpp +1 -1
- data/src/cxx_supportlib/oxt/macros.hpp +1 -1
- data/src/cxx_supportlib/oxt/spin_lock.hpp +1 -1
- data/src/cxx_supportlib/oxt/system_calls.cpp +1 -1
- data/src/cxx_supportlib/oxt/system_calls.hpp +1 -1
- data/src/cxx_supportlib/oxt/thread.hpp +1 -1
- data/src/cxx_supportlib/oxt/tracable_exception.hpp +1 -1
- data/src/cxx_supportlib/vendor-copy/adhoc_lve.h +1 -1
- data/src/cxx_supportlib/vendor-copy/libuv/AUTHORS +353 -3
- data/src/cxx_supportlib/vendor-copy/libuv/ChangeLog +3981 -2
- data/src/cxx_supportlib/vendor-copy/libuv/LICENSE +1 -28
- data/src/cxx_supportlib/vendor-copy/libuv/LICENSE-docs +396 -0
- data/src/cxx_supportlib/vendor-copy/libuv/LICENSE-extra +36 -0
- data/src/cxx_supportlib/vendor-copy/libuv/Makefile.am +275 -58
- data/src/cxx_supportlib/vendor-copy/libuv/Makefile.in +4380 -2125
- data/src/cxx_supportlib/vendor-copy/libuv/aclocal.m4 +425 -221
- data/src/cxx_supportlib/vendor-copy/libuv/ar-lib +30 -10
- data/src/cxx_supportlib/vendor-copy/libuv/compile +31 -14
- data/src/cxx_supportlib/vendor-copy/libuv/config.guess +1084 -690
- data/src/cxx_supportlib/vendor-copy/libuv/config.sub +1844 -1297
- data/src/cxx_supportlib/vendor-copy/libuv/configure +6935 -3664
- data/src/cxx_supportlib/vendor-copy/libuv/configure.ac +43 -19
- data/src/cxx_supportlib/vendor-copy/libuv/depcomp +12 -11
- data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-darwin.h → uv/darwin.h} +3 -3
- data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-errno.h → uv/errno.h} +119 -60
- data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-linux.h → uv/linux.h} +1 -1
- data/src/cxx_supportlib/vendor-copy/libuv/include/uv/os390.h +33 -0
- data/src/cxx_supportlib/vendor-copy/libuv/include/uv/posix.h +31 -0
- data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-threadpool.h → uv/threadpool.h} +1 -1
- data/src/cxx_supportlib/vendor-copy/libuv/include/{tree.h → uv/tree.h} +3 -250
- data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-unix.h → uv/unix.h} +186 -60
- data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-version.h → uv/version.h} +3 -3
- data/src/cxx_supportlib/vendor-copy/libuv/include/uv/win.h +703 -0
- data/src/cxx_supportlib/vendor-copy/libuv/include/uv.h +528 -40
- data/src/cxx_supportlib/vendor-copy/libuv/install-sh +110 -70
- data/src/cxx_supportlib/vendor-copy/libuv/libuv-static.pc.in +12 -0
- data/src/cxx_supportlib/vendor-copy/libuv/libuv.pc.in +4 -2
- data/src/cxx_supportlib/vendor-copy/libuv/ltmain.sh +995 -619
- data/src/cxx_supportlib/vendor-copy/libuv/m4/ax_pthread.m4 +485 -0
- data/src/cxx_supportlib/vendor-copy/libuv/m4/libtool.m4 +438 -289
- data/src/cxx_supportlib/vendor-copy/libuv/m4/libuv-check-flags.m4 +21 -4
- data/src/cxx_supportlib/vendor-copy/libuv/m4/libuv-check-versions.m4 +7 -0
- data/src/cxx_supportlib/vendor-copy/libuv/m4/ltoptions.m4 +69 -39
- data/src/cxx_supportlib/vendor-copy/libuv/m4/ltsugar.m4 +1 -1
- data/src/cxx_supportlib/vendor-copy/libuv/m4/ltversion.m4 +7 -6
- data/src/cxx_supportlib/vendor-copy/libuv/m4/lt~obsolete.m4 +2 -2
- data/src/cxx_supportlib/vendor-copy/libuv/missing +55 -34
- data/src/cxx_supportlib/vendor-copy/libuv/src/fs-poll.c +52 -20
- data/src/cxx_supportlib/vendor-copy/libuv/src/idna.c +560 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/idna.h +31 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/inet.c +5 -16
- data/src/cxx_supportlib/vendor-copy/libuv/src/queue.h +68 -86
- data/src/cxx_supportlib/vendor-copy/libuv/src/random.c +123 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/strscpy.c +38 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/strscpy.h +39 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/strtok.c +52 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/strtok.h +27 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/thread-common.c +175 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/threadpool.c +172 -57
- data/src/cxx_supportlib/vendor-copy/libuv/src/{unix/timer.c → timer.c} +57 -29
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/aix-common.c +89 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/aix.c +418 -256
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/async.c +168 -129
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/bsd-ifaddrs.c +163 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/bsd-proctitle.c +99 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/core.c +1312 -378
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/cygwin.c +93 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin-proctitle.c +18 -32
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin-stub.h +97 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin-syscalls.h +17 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin.c +41 -139
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/dl.c +1 -1
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/freebsd.c +75 -235
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/fs.c +1308 -299
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/fsevents.c +150 -148
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/getaddrinfo.c +58 -8
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/getnameinfo.c +3 -2
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/haiku.c +172 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/hurd.c +172 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/ibmi.c +542 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/internal.h +297 -106
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/kqueue.c +325 -94
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux.c +2708 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/loop-watcher.c +11 -11
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/loop.c +105 -24
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/netbsd.c +51 -157
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/no-fsevents.c +42 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/no-proctitle.c +45 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/openbsd.c +42 -183
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390-proctitle.c +136 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390-syscalls.c +536 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390-syscalls.h +75 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390.c +1070 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/pipe.c +324 -55
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/poll.c +58 -11
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/posix-hrtime.c +36 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/posix-poll.c +385 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/process.c +795 -248
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/procfs-exepath.c +45 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/proctitle.c +77 -22
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/qnx.c +142 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-devurandom.c +93 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-getentropy.c +57 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-getrandom.c +86 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-sysctl-linux.c +99 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/signal.c +147 -39
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/stream.c +426 -474
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/sunos.c +240 -98
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/sysinfo-loadavg.c +36 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/sysinfo-memory.c +42 -0
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/tcp.c +402 -91
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/thread.c +497 -145
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/tty.c +269 -45
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/udp.c +695 -165
- data/src/cxx_supportlib/vendor-copy/libuv/src/uv-common.c +463 -61
- data/src/cxx_supportlib/vendor-copy/libuv/src/uv-common.h +248 -44
- data/src/cxx_supportlib/vendor-copy/libuv/src/uv-data-getter-setters.c +119 -0
- data/src/cxx_supportlib/vendor-copy/libuv/tsansupp.txt +2 -0
- data/src/cxx_supportlib/vendor-modified/libev/Changes +109 -0
- data/src/cxx_supportlib/vendor-modified/libev/Makefile.am +2 -1
- data/src/cxx_supportlib/vendor-modified/libev/Makefile.in +47 -33
- data/src/cxx_supportlib/vendor-modified/libev/README +2 -1
- data/src/cxx_supportlib/vendor-modified/libev/aclocal.m4 +1653 -1224
- data/src/cxx_supportlib/vendor-modified/libev/config.guess +376 -316
- data/src/cxx_supportlib/vendor-modified/libev/config.h.in +13 -2
- data/src/cxx_supportlib/vendor-modified/libev/config.sub +156 -154
- data/src/cxx_supportlib/vendor-modified/libev/configure +1431 -940
- data/src/cxx_supportlib/vendor-modified/libev/configure.ac +3 -3
- data/src/cxx_supportlib/vendor-modified/libev/depcomp +5 -5
- data/src/cxx_supportlib/vendor-modified/libev/ev++.h +109 -107
- data/src/cxx_supportlib/vendor-modified/libev/ev.c +807 -319
- data/src/cxx_supportlib/vendor-modified/libev/ev.h +111 -105
- data/src/cxx_supportlib/vendor-modified/libev/ev_epoll.c +42 -29
- data/src/cxx_supportlib/vendor-modified/libev/ev_iouring.c +694 -0
- data/src/cxx_supportlib/vendor-modified/libev/ev_kqueue.c +15 -9
- data/src/cxx_supportlib/vendor-modified/libev/ev_linuxaio.c +620 -0
- data/src/cxx_supportlib/vendor-modified/libev/ev_poll.c +19 -14
- data/src/cxx_supportlib/vendor-modified/libev/ev_port.c +8 -5
- data/src/cxx_supportlib/vendor-modified/libev/ev_select.c +6 -6
- data/src/cxx_supportlib/vendor-modified/libev/ev_vars.h +48 -3
- data/src/cxx_supportlib/vendor-modified/libev/ev_win32.c +2 -2
- data/src/cxx_supportlib/vendor-modified/libev/ev_wrap.h +72 -0
- data/src/cxx_supportlib/vendor-modified/libev/install-sh +23 -13
- data/src/cxx_supportlib/vendor-modified/libev/libev.m4 +6 -1
- data/src/cxx_supportlib/vendor-modified/libev/ltmain.sh +3581 -1993
- data/src/cxx_supportlib/vendor-modified/libev/missing +8 -8
- data/src/cxx_supportlib/vendor-modified/libev/mkinstalldirs +3 -3
- data/src/cxx_supportlib/vendor-modified/modp_b64_strict_aliasing.cpp +1 -1
- data/src/helper-scripts/backtrace-sanitizer.rb +1 -1
- data/src/helper-scripts/crash-watch.rb +1 -1
- data/src/helper-scripts/download_binaries/extconf.rb +1 -1
- data/src/helper-scripts/meteor-loader.rb +1 -1
- data/src/helper-scripts/node-loader.js +1 -1
- data/src/helper-scripts/prespawn +1 -1
- data/src/helper-scripts/rack-loader.rb +1 -1
- data/src/helper-scripts/rack-preloader.rb +1 -1
- data/src/helper-scripts/wsgi-loader.py +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c.cxxcodebuilder +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c.cxxcodebuilder +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +1 -1
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c.cxxcodebuilder +1 -1
- data/src/nginx_module/Configuration.c +1 -1
- data/src/nginx_module/Configuration.h +1 -1
- data/src/nginx_module/ContentHandler.c +1 -1
- data/src/nginx_module/ContentHandler.h +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c.cxxcodebuilder +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c.cxxcodebuilder +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +1 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
- data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +1 -1
- data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder +1 -1
- data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +1 -1
- data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +1 -1
- data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +1 -1
- data/src/nginx_module/MainConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
- data/src/nginx_module/StaticContentHandler.c +1 -1
- data/src/nginx_module/StaticContentHandler.h +1 -1
- data/src/nginx_module/ngx_http_passenger_module.c +1 -1
- data/src/nginx_module/ngx_http_passenger_module.h +1 -1
- data/src/nodejs_supportlib/phusion_passenger/line_reader.js +1 -1
- data/src/ruby_native_extension/extconf.rb +1 -1
- data/src/ruby_native_extension/passenger_native_support.c +1 -1
- data/src/ruby_supportlib/phusion_passenger/abstract_installer.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/admin_tools/instance_registry.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/admin_tools/memory_stats.rb +2 -12
- data/src/ruby_supportlib/phusion_passenger/admin_tools.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/apache2/config_utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +8 -10
- data/src/ruby_supportlib/phusion_passenger/config/about_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/agent_compiler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/api_call_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/build_native_support_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/compile_agent_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/compile_nginx_engine_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/detach_process_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/download_agent_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/download_nginx_engine_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/install_agent_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/install_standalone_runtime_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/installation_utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/list_instances_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/main.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/reopen_logs_command.rb +6 -1
- data/src/ruby_supportlib/phusion_passenger/config/restart_app_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/system_metrics_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/system_properties_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/config/validate_install_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/console_text_template.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/constants.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/debug_logging.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/message_channel.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/message_client.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/native_support.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +4 -3
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache_detector.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/binary_compatibility.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +195 -11
- data/src/ruby_supportlib/phusion_passenger/platform_info/crypto.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/curl.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/linux.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/networking.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/openssl.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/pcre.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/zlib.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/plugin.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/public_api.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack/handler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack/out_of_band_gc.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack_handler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +2 -7
- data/src/ruby_supportlib/phusion_passenger/request_handler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/ruby_core_enhancements.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/ruby_core_io_enhancements.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/simple_benchmarking.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/control_utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/main.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +2 -2
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +4 -8
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/status_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/stop_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/standalone/version_command.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/ansi_colors.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/download.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/file_system_watcher.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/hosts_file_parser.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/lock.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/native_support_utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/progress_bar.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/strscan.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/terminal_choice_menu.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/unseekable_socket.rb +3 -13
- data/src/ruby_supportlib/phusion_passenger/utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/app.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/base.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/gdb_controller.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/lldb_controller.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/utils.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/version.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/lock_file.rb +8 -6
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/spawn.rb +4 -3
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/version.rb +6 -4
- data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +395 -579
- data/src/ruby_supportlib/phusion_passenger.rb +8 -8
- data/src/schema_printer/SchemaPrinterMain.cpp +1 -1
- data/src/schema_printer/SchemaPrinterMain.cpp.cxxcodebuilder +1 -1
- metadata +69 -32
- data/doc/DeveloperQuickstart.md +0 -70
- data/src/README.md +0 -7
- data/src/cxx_supportlib/vendor-copy/libuv/README.md +0 -245
- data/src/cxx_supportlib/vendor-copy/libuv/checksparse.sh +0 -234
- data/src/cxx_supportlib/vendor-copy/libuv/common.gypi +0 -210
- data/src/cxx_supportlib/vendor-copy/libuv/gyp_uv.py +0 -93
- data/src/cxx_supportlib/vendor-copy/libuv/include/android-ifaddrs.h +0 -54
- data/src/cxx_supportlib/vendor-copy/libuv/include/pthread-fixes.h +0 -72
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/android-ifaddrs.c +0 -703
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/atomic-ops.h +0 -77
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-core.c +0 -899
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-inotify.c +0 -285
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-syscalls.c +0 -471
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-syscalls.h +0 -158
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/pthread-fixes.c +0 -104
- data/src/cxx_supportlib/vendor-copy/libuv/src/unix/spinlock.h +0 -53
- data/src/cxx_supportlib/vendor-copy/libuv/uv.gyp +0 -508
- /data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-aix.h → uv/aix.h} +0 -0
- /data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-bsd.h → uv/bsd.h} +0 -0
- /data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-sunos.h → uv/sunos.h} +0 -0
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
/* Copyright libuv contributors. All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
4
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
5
|
+
* copyright notice and this permission notice appear in all copies.
|
|
6
|
+
*
|
|
7
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
8
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
9
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
10
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
11
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
12
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
13
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/* Derived from https://github.com/bnoordhuis/punycode
|
|
17
|
+
* but updated to support IDNA 2008.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
#include "uv.h"
|
|
21
|
+
#include "uv-common.h"
|
|
22
|
+
#include "idna.h"
|
|
23
|
+
#include <assert.h>
|
|
24
|
+
#include <string.h>
|
|
25
|
+
#include <limits.h> /* UINT_MAX */
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
static int32_t uv__wtf8_decode1(const char** input) {
|
|
29
|
+
uint32_t code_point;
|
|
30
|
+
uint8_t b1;
|
|
31
|
+
uint8_t b2;
|
|
32
|
+
uint8_t b3;
|
|
33
|
+
uint8_t b4;
|
|
34
|
+
|
|
35
|
+
b1 = **input;
|
|
36
|
+
if (b1 <= 0x7F)
|
|
37
|
+
return b1; /* ASCII code point */
|
|
38
|
+
if (b1 < 0xC2)
|
|
39
|
+
return -1; /* invalid: continuation byte */
|
|
40
|
+
code_point = b1;
|
|
41
|
+
|
|
42
|
+
b2 = *++*input;
|
|
43
|
+
if ((b2 & 0xC0) != 0x80)
|
|
44
|
+
return -1; /* invalid: not a continuation byte */
|
|
45
|
+
code_point = (code_point << 6) | (b2 & 0x3F);
|
|
46
|
+
if (b1 <= 0xDF)
|
|
47
|
+
return 0x7FF & code_point; /* two-byte character */
|
|
48
|
+
|
|
49
|
+
b3 = *++*input;
|
|
50
|
+
if ((b3 & 0xC0) != 0x80)
|
|
51
|
+
return -1; /* invalid: not a continuation byte */
|
|
52
|
+
code_point = (code_point << 6) | (b3 & 0x3F);
|
|
53
|
+
if (b1 <= 0xEF)
|
|
54
|
+
return 0xFFFF & code_point; /* three-byte character */
|
|
55
|
+
|
|
56
|
+
b4 = *++*input;
|
|
57
|
+
if ((b4 & 0xC0) != 0x80)
|
|
58
|
+
return -1; /* invalid: not a continuation byte */
|
|
59
|
+
code_point = (code_point << 6) | (b4 & 0x3F);
|
|
60
|
+
if (b1 <= 0xF4) {
|
|
61
|
+
code_point &= 0x1FFFFF;
|
|
62
|
+
if (code_point <= 0x10FFFF)
|
|
63
|
+
return code_point; /* four-byte character */
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* code point too large */
|
|
67
|
+
return -1;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
static unsigned uv__utf8_decode1_slow(const char** p,
|
|
72
|
+
const char* pe,
|
|
73
|
+
unsigned a) {
|
|
74
|
+
unsigned b;
|
|
75
|
+
unsigned c;
|
|
76
|
+
unsigned d;
|
|
77
|
+
unsigned min;
|
|
78
|
+
|
|
79
|
+
if (a > 0xF7)
|
|
80
|
+
return -1;
|
|
81
|
+
|
|
82
|
+
switch (pe - *p) {
|
|
83
|
+
default:
|
|
84
|
+
if (a > 0xEF) {
|
|
85
|
+
min = 0x10000;
|
|
86
|
+
a = a & 7;
|
|
87
|
+
b = (unsigned char) *(*p)++;
|
|
88
|
+
c = (unsigned char) *(*p)++;
|
|
89
|
+
d = (unsigned char) *(*p)++;
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
/* Fall through. */
|
|
93
|
+
case 2:
|
|
94
|
+
if (a > 0xDF) {
|
|
95
|
+
min = 0x800;
|
|
96
|
+
b = 0x80 | (a & 15);
|
|
97
|
+
c = (unsigned char) *(*p)++;
|
|
98
|
+
d = (unsigned char) *(*p)++;
|
|
99
|
+
a = 0;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
/* Fall through. */
|
|
103
|
+
case 1:
|
|
104
|
+
if (a > 0xBF) {
|
|
105
|
+
min = 0x80;
|
|
106
|
+
b = 0x80;
|
|
107
|
+
c = 0x80 | (a & 31);
|
|
108
|
+
d = (unsigned char) *(*p)++;
|
|
109
|
+
a = 0;
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
/* Fall through. */
|
|
113
|
+
case 0:
|
|
114
|
+
return -1; /* Invalid continuation byte. */
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (0x80 != (0xC0 & (b ^ c ^ d)))
|
|
118
|
+
return -1; /* Invalid sequence. */
|
|
119
|
+
|
|
120
|
+
b &= 63;
|
|
121
|
+
c &= 63;
|
|
122
|
+
d &= 63;
|
|
123
|
+
a = (a << 18) | (b << 12) | (c << 6) | d;
|
|
124
|
+
|
|
125
|
+
if (a < min)
|
|
126
|
+
return -1; /* Overlong sequence. */
|
|
127
|
+
|
|
128
|
+
if (a > 0x10FFFF)
|
|
129
|
+
return -1; /* Four-byte sequence > U+10FFFF. */
|
|
130
|
+
|
|
131
|
+
if (a >= 0xD800 && a <= 0xDFFF)
|
|
132
|
+
return -1; /* Surrogate pair. */
|
|
133
|
+
|
|
134
|
+
return a;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
unsigned uv__utf8_decode1(const char** p, const char* pe) {
|
|
139
|
+
unsigned a;
|
|
140
|
+
|
|
141
|
+
assert(*p < pe);
|
|
142
|
+
|
|
143
|
+
a = (unsigned char) *(*p)++;
|
|
144
|
+
|
|
145
|
+
if (a < 128)
|
|
146
|
+
return a; /* ASCII, common case. */
|
|
147
|
+
|
|
148
|
+
return uv__utf8_decode1_slow(p, pe, a);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
static int uv__idna_toascii_label(const char* s, const char* se,
|
|
153
|
+
char** d, char* de) {
|
|
154
|
+
static const char alphabet[] = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
155
|
+
const char* ss;
|
|
156
|
+
unsigned c;
|
|
157
|
+
unsigned h;
|
|
158
|
+
unsigned k;
|
|
159
|
+
unsigned n;
|
|
160
|
+
unsigned m;
|
|
161
|
+
unsigned q;
|
|
162
|
+
unsigned t;
|
|
163
|
+
unsigned x;
|
|
164
|
+
unsigned y;
|
|
165
|
+
unsigned bias;
|
|
166
|
+
unsigned delta;
|
|
167
|
+
unsigned todo;
|
|
168
|
+
int first;
|
|
169
|
+
|
|
170
|
+
h = 0;
|
|
171
|
+
ss = s;
|
|
172
|
+
todo = 0;
|
|
173
|
+
|
|
174
|
+
/* Note: after this loop we've visited all UTF-8 characters and know
|
|
175
|
+
* they're legal so we no longer need to check for decode errors.
|
|
176
|
+
*/
|
|
177
|
+
while (s < se) {
|
|
178
|
+
c = uv__utf8_decode1(&s, se);
|
|
179
|
+
|
|
180
|
+
if (c == UINT_MAX)
|
|
181
|
+
return UV_EINVAL;
|
|
182
|
+
|
|
183
|
+
if (c < 128)
|
|
184
|
+
h++;
|
|
185
|
+
else
|
|
186
|
+
todo++;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Only write "xn--" when there are non-ASCII characters. */
|
|
190
|
+
if (todo > 0) {
|
|
191
|
+
if (*d < de) *(*d)++ = 'x';
|
|
192
|
+
if (*d < de) *(*d)++ = 'n';
|
|
193
|
+
if (*d < de) *(*d)++ = '-';
|
|
194
|
+
if (*d < de) *(*d)++ = '-';
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* Write ASCII characters. */
|
|
198
|
+
x = 0;
|
|
199
|
+
s = ss;
|
|
200
|
+
while (s < se) {
|
|
201
|
+
c = uv__utf8_decode1(&s, se);
|
|
202
|
+
assert(c != UINT_MAX);
|
|
203
|
+
|
|
204
|
+
if (c > 127)
|
|
205
|
+
continue;
|
|
206
|
+
|
|
207
|
+
if (*d < de)
|
|
208
|
+
*(*d)++ = c;
|
|
209
|
+
|
|
210
|
+
if (++x == h)
|
|
211
|
+
break; /* Visited all ASCII characters. */
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (todo == 0)
|
|
215
|
+
return h;
|
|
216
|
+
|
|
217
|
+
/* Only write separator when we've written ASCII characters first. */
|
|
218
|
+
if (h > 0)
|
|
219
|
+
if (*d < de)
|
|
220
|
+
*(*d)++ = '-';
|
|
221
|
+
|
|
222
|
+
n = 128;
|
|
223
|
+
bias = 72;
|
|
224
|
+
delta = 0;
|
|
225
|
+
first = 1;
|
|
226
|
+
|
|
227
|
+
while (todo > 0) {
|
|
228
|
+
m = -1;
|
|
229
|
+
s = ss;
|
|
230
|
+
|
|
231
|
+
while (s < se) {
|
|
232
|
+
c = uv__utf8_decode1(&s, se);
|
|
233
|
+
assert(c != UINT_MAX);
|
|
234
|
+
|
|
235
|
+
if (c >= n)
|
|
236
|
+
if (c < m)
|
|
237
|
+
m = c;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
x = m - n;
|
|
241
|
+
y = h + 1;
|
|
242
|
+
|
|
243
|
+
if (x > ~delta / y)
|
|
244
|
+
return UV_E2BIG; /* Overflow. */
|
|
245
|
+
|
|
246
|
+
delta += x * y;
|
|
247
|
+
n = m;
|
|
248
|
+
|
|
249
|
+
s = ss;
|
|
250
|
+
while (s < se) {
|
|
251
|
+
c = uv__utf8_decode1(&s, se);
|
|
252
|
+
assert(c != UINT_MAX);
|
|
253
|
+
|
|
254
|
+
if (c < n)
|
|
255
|
+
if (++delta == 0)
|
|
256
|
+
return UV_E2BIG; /* Overflow. */
|
|
257
|
+
|
|
258
|
+
if (c != n)
|
|
259
|
+
continue;
|
|
260
|
+
|
|
261
|
+
for (k = 36, q = delta; /* empty */; k += 36) {
|
|
262
|
+
t = 1;
|
|
263
|
+
|
|
264
|
+
if (k > bias)
|
|
265
|
+
t = k - bias;
|
|
266
|
+
|
|
267
|
+
if (t > 26)
|
|
268
|
+
t = 26;
|
|
269
|
+
|
|
270
|
+
if (q < t)
|
|
271
|
+
break;
|
|
272
|
+
|
|
273
|
+
/* TODO(bnoordhuis) Since 1 <= t <= 26 and therefore
|
|
274
|
+
* 10 <= y <= 35, we can optimize the long division
|
|
275
|
+
* into a table-based reciprocal multiplication.
|
|
276
|
+
*/
|
|
277
|
+
x = q - t;
|
|
278
|
+
y = 36 - t; /* 10 <= y <= 35 since 1 <= t <= 26. */
|
|
279
|
+
q = x / y;
|
|
280
|
+
t = t + x % y; /* 1 <= t <= 35 because of y. */
|
|
281
|
+
|
|
282
|
+
if (*d < de)
|
|
283
|
+
*(*d)++ = alphabet[t];
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
if (*d < de)
|
|
287
|
+
*(*d)++ = alphabet[q];
|
|
288
|
+
|
|
289
|
+
delta /= 2;
|
|
290
|
+
|
|
291
|
+
if (first) {
|
|
292
|
+
delta /= 350;
|
|
293
|
+
first = 0;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* No overflow check is needed because |delta| was just
|
|
297
|
+
* divided by 2 and |delta+delta >= delta + delta/h|.
|
|
298
|
+
*/
|
|
299
|
+
h++;
|
|
300
|
+
delta += delta / h;
|
|
301
|
+
|
|
302
|
+
for (bias = 0; delta > 35 * 26 / 2; bias += 36)
|
|
303
|
+
delta /= 35;
|
|
304
|
+
|
|
305
|
+
bias += 36 * delta / (delta + 38);
|
|
306
|
+
delta = 0;
|
|
307
|
+
todo--;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
delta++;
|
|
311
|
+
n++;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return 0;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
ssize_t uv__idna_toascii(const char* s, const char* se, char* d, char* de) {
|
|
319
|
+
const char* si;
|
|
320
|
+
const char* st;
|
|
321
|
+
unsigned c;
|
|
322
|
+
char* ds;
|
|
323
|
+
int rc;
|
|
324
|
+
|
|
325
|
+
if (s == se)
|
|
326
|
+
return UV_EINVAL;
|
|
327
|
+
|
|
328
|
+
ds = d;
|
|
329
|
+
|
|
330
|
+
si = s;
|
|
331
|
+
while (si < se) {
|
|
332
|
+
st = si;
|
|
333
|
+
c = uv__utf8_decode1(&si, se);
|
|
334
|
+
|
|
335
|
+
if (c == UINT_MAX)
|
|
336
|
+
return UV_EINVAL;
|
|
337
|
+
|
|
338
|
+
if (c != '.')
|
|
339
|
+
if (c != 0x3002) /* 。 */
|
|
340
|
+
if (c != 0xFF0E) /* . */
|
|
341
|
+
if (c != 0xFF61) /* 。 */
|
|
342
|
+
continue;
|
|
343
|
+
|
|
344
|
+
rc = uv__idna_toascii_label(s, st, &d, de);
|
|
345
|
+
|
|
346
|
+
if (rc < 0)
|
|
347
|
+
return rc;
|
|
348
|
+
|
|
349
|
+
if (d < de)
|
|
350
|
+
*d++ = '.';
|
|
351
|
+
|
|
352
|
+
s = si;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
if (s < se) {
|
|
356
|
+
rc = uv__idna_toascii_label(s, se, &d, de);
|
|
357
|
+
|
|
358
|
+
if (rc < 0)
|
|
359
|
+
return rc;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
if (d >= de)
|
|
363
|
+
return UV_EINVAL;
|
|
364
|
+
|
|
365
|
+
*d++ = '\0';
|
|
366
|
+
return d - ds; /* Number of bytes written. */
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
ssize_t uv_wtf8_length_as_utf16(const char* source_ptr) {
|
|
371
|
+
size_t w_target_len = 0;
|
|
372
|
+
int32_t code_point;
|
|
373
|
+
|
|
374
|
+
do {
|
|
375
|
+
code_point = uv__wtf8_decode1(&source_ptr);
|
|
376
|
+
if (code_point < 0)
|
|
377
|
+
return -1;
|
|
378
|
+
if (code_point > 0xFFFF)
|
|
379
|
+
w_target_len++;
|
|
380
|
+
w_target_len++;
|
|
381
|
+
} while (*source_ptr++);
|
|
382
|
+
|
|
383
|
+
return w_target_len;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
void uv_wtf8_to_utf16(const char* source_ptr,
|
|
388
|
+
uint16_t* w_target,
|
|
389
|
+
size_t w_target_len) {
|
|
390
|
+
int32_t code_point;
|
|
391
|
+
|
|
392
|
+
do {
|
|
393
|
+
code_point = uv__wtf8_decode1(&source_ptr);
|
|
394
|
+
/* uv_wtf8_length_as_utf16 should have been called and checked first. */
|
|
395
|
+
assert(code_point >= 0);
|
|
396
|
+
if (code_point > 0x10000) {
|
|
397
|
+
assert(code_point < 0x10FFFF);
|
|
398
|
+
*w_target++ = (((code_point - 0x10000) >> 10) + 0xD800);
|
|
399
|
+
*w_target++ = ((code_point - 0x10000) & 0x3FF) + 0xDC00;
|
|
400
|
+
w_target_len -= 2;
|
|
401
|
+
} else {
|
|
402
|
+
*w_target++ = code_point;
|
|
403
|
+
w_target_len -= 1;
|
|
404
|
+
}
|
|
405
|
+
} while (*source_ptr++);
|
|
406
|
+
|
|
407
|
+
(void)w_target_len;
|
|
408
|
+
assert(w_target_len == 0);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
static int32_t uv__get_surrogate_value(const uint16_t* w_source_ptr,
|
|
413
|
+
ssize_t w_source_len) {
|
|
414
|
+
uint16_t u;
|
|
415
|
+
uint16_t next;
|
|
416
|
+
|
|
417
|
+
u = w_source_ptr[0];
|
|
418
|
+
if (u >= 0xD800 && u <= 0xDBFF && w_source_len != 1) {
|
|
419
|
+
next = w_source_ptr[1];
|
|
420
|
+
if (next >= 0xDC00 && next <= 0xDFFF)
|
|
421
|
+
return 0x10000 + ((u - 0xD800) << 10) + (next - 0xDC00);
|
|
422
|
+
}
|
|
423
|
+
return u;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
size_t uv_utf16_length_as_wtf8(const uint16_t* w_source_ptr,
|
|
428
|
+
ssize_t w_source_len) {
|
|
429
|
+
size_t target_len;
|
|
430
|
+
int32_t code_point;
|
|
431
|
+
|
|
432
|
+
target_len = 0;
|
|
433
|
+
while (w_source_len) {
|
|
434
|
+
code_point = uv__get_surrogate_value(w_source_ptr, w_source_len);
|
|
435
|
+
/* Can be invalid UTF-8 but must be valid WTF-8. */
|
|
436
|
+
assert(code_point >= 0);
|
|
437
|
+
if (w_source_len < 0 && code_point == 0)
|
|
438
|
+
break;
|
|
439
|
+
if (code_point < 0x80)
|
|
440
|
+
target_len += 1;
|
|
441
|
+
else if (code_point < 0x800)
|
|
442
|
+
target_len += 2;
|
|
443
|
+
else if (code_point < 0x10000)
|
|
444
|
+
target_len += 3;
|
|
445
|
+
else {
|
|
446
|
+
target_len += 4;
|
|
447
|
+
w_source_ptr++;
|
|
448
|
+
if (w_source_len > 0)
|
|
449
|
+
w_source_len--;
|
|
450
|
+
}
|
|
451
|
+
w_source_ptr++;
|
|
452
|
+
if (w_source_len > 0)
|
|
453
|
+
w_source_len--;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
return target_len;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
int uv_utf16_to_wtf8(const uint16_t* w_source_ptr,
|
|
461
|
+
ssize_t w_source_len,
|
|
462
|
+
char** target_ptr,
|
|
463
|
+
size_t* target_len_ptr) {
|
|
464
|
+
size_t target_len;
|
|
465
|
+
char* target;
|
|
466
|
+
char* target_end;
|
|
467
|
+
int32_t code_point;
|
|
468
|
+
|
|
469
|
+
/* If *target_ptr is provided, then *target_len_ptr must be its length
|
|
470
|
+
* (excluding space for NUL), otherwise we will compute the target_len_ptr
|
|
471
|
+
* length and may return a new allocation in *target_ptr if target_ptr is
|
|
472
|
+
* provided. */
|
|
473
|
+
if (target_ptr == NULL || *target_ptr == NULL) {
|
|
474
|
+
target_len = uv_utf16_length_as_wtf8(w_source_ptr, w_source_len);
|
|
475
|
+
if (target_len_ptr != NULL)
|
|
476
|
+
*target_len_ptr = target_len;
|
|
477
|
+
} else {
|
|
478
|
+
target_len = *target_len_ptr;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
if (target_ptr == NULL)
|
|
482
|
+
return 0;
|
|
483
|
+
|
|
484
|
+
if (*target_ptr == NULL) {
|
|
485
|
+
target = uv__malloc(target_len + 1);
|
|
486
|
+
if (target == NULL) {
|
|
487
|
+
return UV_ENOMEM;
|
|
488
|
+
}
|
|
489
|
+
*target_ptr = target;
|
|
490
|
+
} else {
|
|
491
|
+
target = *target_ptr;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
target_end = target + target_len;
|
|
495
|
+
|
|
496
|
+
while (target != target_end && w_source_len) {
|
|
497
|
+
code_point = uv__get_surrogate_value(w_source_ptr, w_source_len);
|
|
498
|
+
/* Can be invalid UTF-8 but must be valid WTF-8. */
|
|
499
|
+
assert(code_point >= 0);
|
|
500
|
+
if (w_source_len < 0 && code_point == 0) {
|
|
501
|
+
w_source_len = 0;
|
|
502
|
+
break;
|
|
503
|
+
}
|
|
504
|
+
if (code_point < 0x80) {
|
|
505
|
+
*target++ = code_point;
|
|
506
|
+
} else if (code_point < 0x800) {
|
|
507
|
+
*target++ = 0xC0 | (code_point >> 6);
|
|
508
|
+
if (target == target_end)
|
|
509
|
+
break;
|
|
510
|
+
*target++ = 0x80 | (code_point & 0x3F);
|
|
511
|
+
} else if (code_point < 0x10000) {
|
|
512
|
+
*target++ = 0xE0 | (code_point >> 12);
|
|
513
|
+
if (target == target_end)
|
|
514
|
+
break;
|
|
515
|
+
*target++ = 0x80 | ((code_point >> 6) & 0x3F);
|
|
516
|
+
if (target == target_end)
|
|
517
|
+
break;
|
|
518
|
+
*target++ = 0x80 | (code_point & 0x3F);
|
|
519
|
+
} else {
|
|
520
|
+
*target++ = 0xF0 | (code_point >> 18);
|
|
521
|
+
if (target == target_end)
|
|
522
|
+
break;
|
|
523
|
+
*target++ = 0x80 | ((code_point >> 12) & 0x3F);
|
|
524
|
+
if (target == target_end)
|
|
525
|
+
break;
|
|
526
|
+
*target++ = 0x80 | ((code_point >> 6) & 0x3F);
|
|
527
|
+
if (target == target_end)
|
|
528
|
+
break;
|
|
529
|
+
*target++ = 0x80 | (code_point & 0x3F);
|
|
530
|
+
/* uv__get_surrogate_value consumed 2 input characters */
|
|
531
|
+
w_source_ptr++;
|
|
532
|
+
if (w_source_len > 0)
|
|
533
|
+
w_source_len--;
|
|
534
|
+
}
|
|
535
|
+
target_len = target - *target_ptr;
|
|
536
|
+
w_source_ptr++;
|
|
537
|
+
if (w_source_len > 0)
|
|
538
|
+
w_source_len--;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
if (target != target_end && target_len_ptr != NULL)
|
|
542
|
+
/* Did not fill all of the provided buffer, so update the target_len_ptr
|
|
543
|
+
* output with the space used. */
|
|
544
|
+
*target_len_ptr = target - *target_ptr;
|
|
545
|
+
|
|
546
|
+
/* Check if input fit into target exactly. */
|
|
547
|
+
if (w_source_len < 0 && target == target_end && w_source_ptr[0] == 0)
|
|
548
|
+
w_source_len = 0;
|
|
549
|
+
|
|
550
|
+
*target++ = '\0';
|
|
551
|
+
|
|
552
|
+
/* Characters remained after filling the buffer, compute the remaining length now. */
|
|
553
|
+
if (w_source_len) {
|
|
554
|
+
if (target_len_ptr != NULL)
|
|
555
|
+
*target_len_ptr = target_len + uv_utf16_length_as_wtf8(w_source_ptr, w_source_len);
|
|
556
|
+
return UV_ENOBUFS;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
return 0;
|
|
560
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* Copyright libuv contributors. All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
4
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
5
|
+
* copyright notice and this permission notice appear in all copies.
|
|
6
|
+
*
|
|
7
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
8
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
9
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
10
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
11
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
12
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
13
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
#ifndef UV_SRC_IDNA_H_
|
|
17
|
+
#define UV_SRC_IDNA_H_
|
|
18
|
+
|
|
19
|
+
/* Decode a single codepoint. Returns the codepoint or UINT32_MAX on error.
|
|
20
|
+
* |p| is updated on success _and_ error, i.e., bad multi-byte sequences are
|
|
21
|
+
* skipped in their entirety, not just the first bad byte.
|
|
22
|
+
*/
|
|
23
|
+
unsigned uv__utf8_decode1(const char** p, const char* pe);
|
|
24
|
+
|
|
25
|
+
/* Convert a UTF-8 domain name to IDNA 2008 / Punycode. A return value >= 0
|
|
26
|
+
* is the number of bytes written to |d|, including the trailing nul byte.
|
|
27
|
+
* A return value < 0 is a libuv error code. |s| and |d| can not overlap.
|
|
28
|
+
*/
|
|
29
|
+
ssize_t uv__idna_toascii(const char* s, const char* se, char* d, char* de);
|
|
30
|
+
|
|
31
|
+
#endif /* UV_SRC_IDNA_H_ */
|
|
@@ -17,12 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
#include <stdio.h>
|
|
19
19
|
#include <string.h>
|
|
20
|
-
|
|
21
|
-
#if defined(_MSC_VER) && _MSC_VER < 1600
|
|
22
|
-
# include "stdint-msvc2008.h"
|
|
23
|
-
#else
|
|
24
|
-
# include <stdint.h>
|
|
25
|
-
#endif
|
|
20
|
+
#include <stdint.h>
|
|
26
21
|
|
|
27
22
|
#include "uv.h"
|
|
28
23
|
#include "uv-common.h"
|
|
@@ -59,8 +54,7 @@ static int inet_ntop4(const unsigned char *src, char *dst, size_t size) {
|
|
|
59
54
|
if (l <= 0 || (size_t) l >= size) {
|
|
60
55
|
return UV_ENOSPC;
|
|
61
56
|
}
|
|
62
|
-
|
|
63
|
-
dst[size - 1] = '\0';
|
|
57
|
+
uv__strscpy(dst, tmp, size);
|
|
64
58
|
return 0;
|
|
65
59
|
}
|
|
66
60
|
|
|
@@ -136,20 +130,15 @@ static int inet_ntop6(const unsigned char *src, char *dst, size_t size) {
|
|
|
136
130
|
tp += strlen(tp);
|
|
137
131
|
break;
|
|
138
132
|
}
|
|
139
|
-
tp +=
|
|
133
|
+
tp += snprintf(tp, sizeof tmp - (tp - tmp), "%x", words[i]);
|
|
140
134
|
}
|
|
141
135
|
/* Was it a trailing run of 0x00's? */
|
|
142
136
|
if (best.base != -1 && (best.base + best.len) == ARRAY_SIZE(words))
|
|
143
137
|
*tp++ = ':';
|
|
144
138
|
*tp++ = '\0';
|
|
145
|
-
|
|
146
|
-
/*
|
|
147
|
-
* Check for overflow, copy, and we're done.
|
|
148
|
-
*/
|
|
149
|
-
if ((size_t)(tp - tmp) > size) {
|
|
139
|
+
if ((size_t) (tp - tmp) > size)
|
|
150
140
|
return UV_ENOSPC;
|
|
151
|
-
|
|
152
|
-
strcpy(dst, tmp);
|
|
141
|
+
uv__strscpy(dst, tmp, size);
|
|
153
142
|
return 0;
|
|
154
143
|
}
|
|
155
144
|
|