passenger 6.0.19 → 6.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +65 -3
- data/CONTRIBUTORS +2 -0
- data/README.md +2 -2
- data/bin/passenger-install-nginx-module +4 -4
- data/build/integration_tests.rb +2 -1
- data/build/support/cxx_dependency_map.rb +155 -54
- data/dev/copy_boost_headers +21 -7
- data/dev/nginx_version_sha256 +72 -0
- data/package.json +15 -15
- data/src/agent/AgentMain.cpp +2 -8
- data/src/agent/Core/AdminPanelConnector.h +2 -3
- data/src/agent/Core/ApiServer.h +1 -1
- data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +8 -1
- data/src/agent/Core/Config.h +6 -3
- data/src/agent/Core/Controller/AppResponse.h +0 -1
- data/src/agent/Core/Controller/Config.h +2 -2
- data/src/agent/Core/Controller/SendRequest.cpp +2 -2
- data/src/agent/Core/CoreMain.cpp +1 -0
- data/src/agent/Core/ResponseCache.h +3 -2
- data/src/agent/Core/SecurityUpdateChecker.h +1 -1
- data/src/agent/Core/SpawningKit/Handshake/Perform.h +4 -4
- data/src/agent/Core/SpawningKit/UserSwitchingRules.h +2 -2
- data/src/agent/ExecHelper/ExecHelperMain.cpp +10 -12
- data/src/agent/FileReadHelper/FileReadHelperMain.cpp +7 -10
- data/src/agent/MainFunctions.h +38 -0
- data/src/agent/Shared/ApiServerUtils.h +3 -2
- data/src/agent/Shared/Fundamentals/Initialization.cpp +1 -1
- data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +2 -3
- data/src/agent/SystemMetrics/SystemMetricsMain.cpp +1 -0
- data/src/agent/TempDirToucher/TempDirToucherMain.cpp +6 -4
- data/src/agent/Watchdog/ApiServer.h +1 -1
- data/src/agent/Watchdog/Config.h +1 -1
- data/src/agent/Watchdog/WatchdogMain.cpp +5 -12
- data/src/apache2_module/Hooks.cpp +26 -1
- data/src/cxx_supportlib/ConfigKit/Common.h +1 -1
- data/src/cxx_supportlib/Constants.h +1 -1
- data/src/cxx_supportlib/DataStructures/StringKeyTable.h +1 -1
- data/src/cxx_supportlib/FileTools/PathManip.cpp +10 -1
- data/src/cxx_supportlib/IOTools/IOUtils.cpp +2 -6
- data/src/cxx_supportlib/Integrations/LibevJsonUtils.h +3 -3
- data/src/cxx_supportlib/JsonTools/CBindings.cpp +0 -2
- data/src/cxx_supportlib/JsonTools/JsonUtils.h +4 -4
- data/src/cxx_supportlib/LoggingKit/Context.h +16 -21
- data/src/cxx_supportlib/LoggingKit/Forward.h +0 -2
- data/src/cxx_supportlib/LoggingKit/Implementation.cpp +36 -72
- data/src/cxx_supportlib/MemoryKit/mbuf.cpp +12 -4
- data/src/cxx_supportlib/MemoryKit/mbuf.h +1 -1
- data/src/cxx_supportlib/ProcessManagement/Utils.cpp +1 -1
- data/src/cxx_supportlib/ResourceLocator.h +1 -1
- data/src/cxx_supportlib/SecurityKit/Crypto.cpp +3 -94
- data/src/cxx_supportlib/SecurityKit/Crypto.h +0 -8
- data/src/cxx_supportlib/ServerKit/Context.h +6 -0
- data/src/cxx_supportlib/ServerKit/Errors.h +3 -2
- data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +99 -64
- data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +4 -1
- data/src/cxx_supportlib/ServerKit/HttpRequest.h +2 -2
- data/src/cxx_supportlib/ServerKit/HttpServer.h +3 -2
- data/src/cxx_supportlib/ServerKit/llerrors.h +84 -0
- data/src/cxx_supportlib/ServerKit/llhttp.c +10168 -0
- data/src/cxx_supportlib/ServerKit/llhttp.h +903 -0
- data/src/cxx_supportlib/ServerKit/llhttp_api.c +510 -0
- data/src/cxx_supportlib/ServerKit/llhttp_http.c +170 -0
- data/src/cxx_supportlib/ServerKit/llversion.h +12 -0
- data/src/cxx_supportlib/ServerKit/url_parser.c +574 -0
- data/src/cxx_supportlib/ServerKit/url_parser.h +74 -0
- data/src/cxx_supportlib/StaticString.h +3 -1
- data/src/cxx_supportlib/StrIntTools/DateParsing.h +1 -1
- data/src/cxx_supportlib/StrIntTools/StrIntUtils.cpp +12 -3
- data/src/cxx_supportlib/StrIntTools/StrIntUtils.h +5 -0
- data/src/cxx_supportlib/SystemTools/SystemMetricsCollector.h +2 -2
- data/src/cxx_supportlib/SystemTools/UserDatabase.cpp +14 -14
- data/src/cxx_supportlib/SystemTools/UserDatabase.h +6 -10
- data/src/cxx_supportlib/Utils/AnsiColorConstants.h +11 -9
- data/src/cxx_supportlib/Utils.cpp +1 -1
- data/src/cxx_supportlib/oxt/implementation.cpp +1 -2
- data/src/cxx_supportlib/oxt/system_calls.cpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_executor.hpp +26 -32
- data/src/cxx_supportlib/vendor-modified/boost/asio/any_completion_handler.hpp +194 -56
- data/src/cxx_supportlib/vendor-modified/boost/asio/any_io_executor.hpp +34 -42
- data/src/cxx_supportlib/vendor-modified/boost/asio/append.hpp +10 -23
- data/src/cxx_supportlib/vendor-modified/boost/asio/as_tuple.hpp +21 -34
- data/src/cxx_supportlib/vendor-modified/boost/asio/associated_allocator.hpp +26 -45
- data/src/cxx_supportlib/vendor-modified/boost/asio/associated_cancellation_slot.hpp +26 -43
- data/src/cxx_supportlib/vendor-modified/boost/asio/associated_executor.hpp +30 -52
- data/src/cxx_supportlib/vendor-modified/boost/asio/associated_immediate_executor.hpp +282 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/associator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/async_result.hpp +178 -863
- data/src/cxx_supportlib/vendor-modified/boost/asio/awaitable.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp +64 -98
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_deadline_timer.hpp +17 -22
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_file.hpp +18 -23
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_io_object.hpp +4 -8
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_random_access_file.hpp +30 -42
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_raw_socket.hpp +65 -96
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_readable_pipe.hpp +20 -29
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_seq_packet_socket.hpp +36 -48
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_serial_port.hpp +31 -44
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_signal_set.hpp +73 -23
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp +34 -45
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_acceptor.hpp +108 -151
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_iostream.hpp +6 -82
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_socket_streambuf.hpp +6 -51
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_file.hpp +30 -40
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_stream_socket.hpp +50 -76
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf.hpp +13 -15
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_streambuf_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_waitable_timer.hpp +23 -32
- data/src/cxx_supportlib/vendor-modified/boost/asio/basic_writable_pipe.hpp +20 -29
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_allocator.hpp +97 -299
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_cancellation_slot.hpp +97 -288
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_executor.hpp +90 -288
- data/src/cxx_supportlib/vendor-modified/boost/asio/bind_immediate_executor.hpp +551 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +365 -290
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffer_registration.hpp +29 -39
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream.hpp +27 -39
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_read_stream_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream.hpp +33 -49
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_stream_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream.hpp +27 -39
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffered_write_stream_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffers_iterator.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/cancellation_signal.hpp +25 -85
- data/src/cxx_supportlib/vendor-modified/boost/asio/cancellation_state.hpp +16 -16
- data/src/cxx_supportlib/vendor-modified/boost/asio/cancellation_type.hpp +8 -25
- data/src/cxx_supportlib/vendor-modified/boost/asio/co_spawn.hpp +17 -17
- data/src/cxx_supportlib/vendor-modified/boost/asio/completion_condition.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/compose.hpp +60 -272
- data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +52 -79
- data/src/cxx_supportlib/vendor-modified/boost/asio/connect_pipe.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/consign.hpp +11 -24
- data/src/cxx_supportlib/vendor-modified/boost/asio/coroutine.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/deadline_timer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/defer.hpp +37 -34
- data/src/cxx_supportlib/vendor-modified/boost/asio/deferred.hpp +302 -262
- data/src/cxx_supportlib/vendor-modified/boost/asio/detached.hpp +12 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array.hpp +2 -10
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/array_fwd.hpp +2 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/assert.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/atomic_count.hpp +5 -13
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_cancellation_state.hpp +21 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/base_from_completion_cond.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bind_handler.hpp +129 -563
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/blocking_executor_op.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_resize_guard.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffer_sequence_adapter.hpp +3 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/buffered_stream_storage.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/call_stack.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono.hpp +2 -23
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/chrono_time_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/completion_handler.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/composed_work.hpp +21 -97
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/concurrency_hint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_event.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/conditionally_enabled_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +155 -963
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/consuming_buffers.hpp +3 -11
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstddef.hpp +1 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/cstdint.hpp +2 -24
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/date_time_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/deadline_timer_service.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dependent_type.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_ops.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_read_op.hpp +41 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/descriptor_write_op.hpp +40 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/dev_poll_reactor.hpp +20 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/epoll_reactor.hpp +20 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/event.hpp +3 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/eventfd_select_interrupter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/exception.hpp +2 -13
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_function.hpp +8 -60
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/executor_op.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fd_set_adapter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/fenced_block.hpp +3 -43
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/functional.hpp +1 -12
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/future.hpp +9 -10
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/global.hpp +3 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_alloc_helpers.hpp +41 -104
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_cont_helpers.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_tracking.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_type_requirements.hpp +9 -15
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_work.hpp +101 -123
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/hash_map.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/buffer_sequence_adapter.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/descriptor_ops.ipp +36 -15
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/dev_poll_reactor.ipp +13 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/epoll_reactor.ipp +17 -8
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/eventfd_select_interrupter.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/handler_tracking.ipp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_descriptor_service.ipp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_file_service.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_service.ipp +69 -35
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/io_uring_socket_service_base.ipp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/kqueue_reactor.ipp +15 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/null_event.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/pipe_select_interrupter.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_event.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_mutex.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_serial_port_service.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_thread.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/posix_tss_ptr.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_descriptor_service.ipp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/reactive_socket_service_base.ipp +26 -18
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/resolver_service_base.ipp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/scheduler.ipp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/select_reactor.ipp +12 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/service_registry.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/signal_set_service.ipp +57 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +63 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_select_interrupter.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.hpp +47 -68
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_executor_service.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/strand_service.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/thread_context.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/throw_error.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_ptime.ipp +12 -12
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/timer_queue_set.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/initiate_defer.hpp +209 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/initiate_dispatch.hpp +195 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/initiate_post.hpp +209 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_control.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_object_impl.hpp +6 -10
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_read_at_op.hpp +6 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_read_op.hpp +6 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_service.hpp +17 -9
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_write_at_op.hpp +6 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_descriptor_write_op.hpp +6 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_file_service.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_null_buffers_op.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_operation.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_service.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_accept_op.hpp +11 -12
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_connect_op.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_recv_op.hpp +6 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_recvfrom_op.hpp +7 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_recvmsg_op.hpp +6 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_send_op.hpp +6 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_sendto_op.hpp +6 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_service.hpp +11 -13
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_socket_service_base.hpp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/io_uring_wait_op.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_buffer_sequence.hpp +7 -49
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/keyword_tss_ptr.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/kqueue_reactor.hpp +20 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/limits.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/local_free_on_block_exit.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/memory.hpp +13 -43
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/mutex.hpp +3 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/non_const_lvalue.hpp +4 -15
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/noncopyable.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_event.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_fenced_block.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_global.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_reactor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_signal_blocker.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_socket_service.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_static_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_thread.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/null_tss_ptr.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/object_pool.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/op_queue.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/operation.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pipe_select_interrupter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/pop_options.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_event.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_fd_set_adapter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_global.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_serial_port_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_signal_blocker.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_static_mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_thread.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/posix_tss_ptr.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/push_options.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_descriptor_service.hpp +61 -25
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_null_buffers_op.hpp +37 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_accept_op.hpp +89 -12
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_connect_op.hpp +41 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recv_op.hpp +40 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvfrom_op.hpp +41 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_recvmsg_op.hpp +41 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_send_op.hpp +41 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_sendto_op.hpp +40 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp +20 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service_base.hpp +135 -38
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_wait_op.hpp +37 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/reactor_op_queue.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/recycling_allocator.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/regex_fwd.hpp +4 -13
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_endpoint_op.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolve_query_op.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/resolver_service_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_operation.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_task.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scheduler_thread_info.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_lock.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/scoped_ptr.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_interrupter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/select_reactor.hpp +20 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/service_registry.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_blocker.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_handler.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_init.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/signal_set_service.hpp +12 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_holder.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_ops.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_option.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_select_interrupter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/socket_types.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/source_location.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/static_mutex.hpp +3 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_event.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_fenced_block.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_global.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_mutex.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_static_mutex.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/std_thread.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_executor_service.hpp +13 -13
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/strand_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/string_view.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread.hpp +3 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_group.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/thread_info_base.hpp +12 -22
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_error.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/throw_exception.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_ptime.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue_set.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_scheduler_fwd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/tss_ptr.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/type_traits.hpp +104 -90
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/utility.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_handler.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wait_op.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/winsock_init.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/work_dispatcher.hpp +20 -34
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/wrapped_handler.hpp +7 -117
- data/src/cxx_supportlib/vendor-modified/boost/asio/dispatch.hpp +36 -34
- data/src/cxx_supportlib/vendor-modified/boost/asio/error.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/allocator.hpp +34 -112
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/any_executor.hpp +268 -991
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bad_executor.hpp +3 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking.hpp +296 -536
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/blocking_adaptation.hpp +232 -409
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context.hpp +20 -73
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/context_as.hpp +30 -72
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/executor.hpp +24 -170
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/impl/bad_executor.ipp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/invocable_archetype.hpp +2 -30
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/mapping.hpp +240 -398
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/occupancy.hpp +20 -73
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/outstanding_work.hpp +149 -296
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/prefer_only.hpp +56 -59
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/relationship.hpp +149 -296
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution.hpp +1 -16
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution_context.hpp +1 -25
- data/src/cxx_supportlib/vendor-modified/boost/asio/executor.hpp +59 -43
- data/src/cxx_supportlib/vendor-modified/boost/asio/executor_work_guard.hpp +56 -61
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/append.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/as_single.hpp +20 -24
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/as_tuple.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/awaitable_operators.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_channel.hpp +56 -34
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/basic_concurrent_channel.hpp +56 -34
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/cancellation_condition.hpp +25 -28
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel_error.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/channel_traits.hpp +15 -15
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_composed.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/co_spawn.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/concurrent_channel.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/coro.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/coro_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/deferred.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_handler.hpp +10 -13
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_message.hpp +27 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_operation.hpp +193 -38
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_payload.hpp +143 -14
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_receive_op.hpp +24 -9
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_send_functions.hpp +77 -17
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_send_op.hpp +20 -12
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/channel_service.hpp +50 -50
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_completion_handler.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/coro_promise_allocator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/has_signature.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/impl/channel_service.hpp +46 -34
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/detail/partial_promise.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/as_single.hpp +33 -96
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/channel_error.ipp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/co_composed.hpp +62 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/coro.hpp +48 -45
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/parallel_group.hpp +56 -60
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/promise.hpp +18 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_coro.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/impl/use_promise.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/parallel_group.hpp +27 -31
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/prepend.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/promise.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_coro.hpp +15 -21
- data/src/cxx_supportlib/vendor-modified/boost/asio/experimental/use_promise.hpp +13 -13
- data/src/cxx_supportlib/vendor-modified/boost/asio/file_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/basic_endpoint.hpp +2 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/datagram_protocol.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/endpoint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/detail/impl/endpoint.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/raw_protocol.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/seq_packet_protocol.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/generic/stream_protocol.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_continuation_hook.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/high_resolution_timer.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_completion_executor.ipp +10 -14
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/any_io_executor.ipp +10 -17
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/append.hpp +37 -100
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/as_tuple.hpp +99 -107
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/awaitable.hpp +66 -25
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_read_stream.hpp +55 -178
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/buffered_write_stream.hpp +55 -178
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/cancellation_signal.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/co_spawn.hpp +123 -73
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect.hpp +84 -234
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect_pipe.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/connect_pipe.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/consign.hpp +32 -97
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/deferred.hpp +73 -31
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/detached.hpp +5 -58
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/error.ipp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.hpp +3 -35
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/execution_context.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.hpp +60 -43
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/executor.ipp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.hpp +39 -56
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.ipp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/multiple_exceptions.ipp +4 -8
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/prepend.hpp +36 -98
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read.hpp +206 -429
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_at.hpp +60 -206
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +456 -970
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/redirect_error.hpp +43 -411
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/serial_port_base.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/spawn.hpp +207 -423
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/src.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_context.ipp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/system_executor.hpp +19 -25
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.hpp +32 -109
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/thread_pool.ipp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_awaitable.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +79 -425
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write.hpp +213 -427
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/write_at.hpp +58 -194
- data/src/cxx_supportlib/vendor-modified/boost/asio/io_context.hpp +91 -120
- data/src/cxx_supportlib/vendor-modified/boost/asio/io_context_strand.hpp +33 -25
- data/src/cxx_supportlib/vendor-modified/boost/asio/io_service.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/io_service_strand.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address.hpp +26 -35
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4.hpp +28 -36
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_iterator.hpp +13 -19
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v4_range.hpp +16 -22
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6.hpp +33 -42
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_iterator.hpp +13 -18
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/address_v6_range.hpp +15 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/bad_address_cast.hpp +13 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_endpoint.hpp +26 -35
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +46 -76
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_entry.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_iterator.hpp +4 -8
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_query.hpp +17 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_results.hpp +9 -13
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/endpoint.hpp +17 -17
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/impl/endpoint.ipp +10 -14
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/detail/socket_option.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/host_name.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/icmp.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address.ipp +18 -22
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v4.ipp +9 -13
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/address_v6.ipp +24 -32
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/basic_endpoint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/host_name.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v4.ipp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/impl/network_v6.ipp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/multicast.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v4.hpp +16 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/network_v6.hpp +14 -18
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/resolver_query_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/tcp.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/udp.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/unicast.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/v6_only.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_applicable_property.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_contiguous_iterator.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_read_buffered.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/is_write_buffered.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/basic_endpoint.hpp +2 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/connect_pair.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/datagram_protocol.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/endpoint.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/detail/impl/endpoint.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/seq_packet_protocol.hpp +86 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/local/stream_protocol.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/multiple_exceptions.hpp +3 -9
- data/src/cxx_supportlib/vendor-modified/boost/asio/packaged_task.hpp +1 -61
- data/src/cxx_supportlib/vendor-modified/boost/asio/placeholders.hpp +29 -105
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_descriptor.hpp +21 -29
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/basic_stream_descriptor.hpp +24 -34
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/descriptor_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/posix/stream_descriptor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/post.hpp +36 -34
- data/src/cxx_supportlib/vendor-modified/boost/asio/prefer.hpp +176 -333
- data/src/cxx_supportlib/vendor-modified/boost/asio/prepend.hpp +11 -23
- data/src/cxx_supportlib/vendor-modified/boost/asio/query.hpp +57 -70
- data/src/cxx_supportlib/vendor-modified/boost/asio/random_access_file.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +136 -168
- data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +35 -52
- data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +256 -298
- data/src/cxx_supportlib/vendor-modified/boost/asio/readable_pipe.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/recycling_allocator.hpp +15 -15
- data/src/cxx_supportlib/vendor-modified/boost/asio/redirect_error.hpp +7 -9
- data/src/cxx_supportlib/vendor-modified/boost/asio/registered_buffer.hpp +35 -47
- data/src/cxx_supportlib/vendor-modified/boost/asio/require.hpp +108 -246
- data/src/cxx_supportlib/vendor-modified/boost/asio/require_concept.hpp +70 -79
- data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/serial_port_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/signal_set_base.hpp +173 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/socket_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/spawn.hpp +127 -161
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_base.hpp +24 -24
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/buffered_handshake_op.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/engine.hpp +3 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/handshake_op.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/engine.ipp +3 -7
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/impl/openssl_init.ipp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/io.hpp +16 -75
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_init.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/openssl_types.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/password_callback.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/read_op.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/shutdown_op.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/stream_core.hpp +15 -19
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/verify_callback.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/detail/write_op.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/error.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/host_name_verification.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +2 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/error.ipp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/host_name_verification.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/rfc2818_verification.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/src.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/rfc2818_verification.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +51 -82
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/verify_mode.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/static_thread_pool.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/steady_timer.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/strand.hpp +91 -118
- data/src/cxx_supportlib/vendor-modified/boost/asio/stream_file.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/streambuf.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/system_context.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/system_executor.hpp +62 -62
- data/src/cxx_supportlib/vendor-modified/boost/asio/system_timer.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/this_coro.hpp +35 -48
- data/src/cxx_supportlib/vendor-modified/boost/asio/thread_pool.hpp +91 -273
- data/src/cxx_supportlib/vendor-modified/boost/asio/time_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/equality_comparable.hpp +14 -18
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/execute_member.hpp +16 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/prefer_free.hpp +16 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/prefer_member.hpp +16 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_free.hpp +16 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_member.hpp +16 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/query_static_constexpr_member.hpp +15 -22
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_concept_free.hpp +16 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_concept_member.hpp +16 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_free.hpp +16 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/require_member.hpp +16 -20
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_query.hpp +20 -26
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_require.hpp +22 -30
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/static_require_concept.hpp +22 -30
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/buffer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/internet.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/io_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/net.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/netfwd.hpp +6 -24
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/socket.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ts/timer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/unyield.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/use_awaitable.hpp +15 -21
- data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +8 -12
- data/src/cxx_supportlib/vendor-modified/boost/asio/uses_executor.hpp +2 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/wait_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/writable_pipe.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +122 -146
- data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +34 -50
- data/src/cxx_supportlib/vendor-modified/boost/asio/yield.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio.hpp +6 -28
- data/src/cxx_supportlib/vendor-modified/boost/assert/source_location.hpp +8 -3
- data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic.hpp +2 -16
- data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic_ref.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_ref_impl.hpp +5 -3
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +6 -4
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +0 -49
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_gcc_x86.hpp +107 -40
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_arch_ops_msvc_x86.hpp +32 -5
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_operations_emulated.hpp +12 -13
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_fp_ops_emulated.hpp +7 -8
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/extra_ops_emulated.hpp +26 -27
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/float_sizes.hpp +122 -35
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fp_ops_emulated.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/pause.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type_traits/remove_cv.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_on_address.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_emulated.hpp +3 -4
- data/src/cxx_supportlib/vendor-modified/boost/atomic/ipc_atomic.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/atomic/ipc_atomic_ref.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/bind/apply.hpp +2 -60
- data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +230 -1740
- data/src/cxx_supportlib/vendor-modified/boost/bind/{bind_cc.hpp → detail/bind_cc.hpp} +20 -20
- data/src/cxx_supportlib/vendor-modified/boost/bind/detail/bind_mf2_cc.hpp +210 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/detail/bind_mf_cc.hpp +405 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/detail/integer_sequence.hpp +111 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/detail/result_traits.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/detail/tuple_for_each.hpp +64 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn.hpp +140 -290
- data/src/cxx_supportlib/vendor-modified/boost/bind/placeholders.hpp +3 -16
- data/src/cxx_supportlib/vendor-modified/boost/bind/protect.hpp +0 -279
- data/src/cxx_supportlib/vendor-modified/boost/bind/std_placeholders.hpp +0 -6
- data/src/cxx_supportlib/vendor-modified/boost/chrono/config.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/is_evenly_divisible_by.hpp +1 -7
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/requires_cxx11.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_get.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/duration_units.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io_v1/chrono_io.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/chrono/system_clocks.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx03.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx11.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx14.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx17.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx20.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/assert_cxx23.hpp +41 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/borland.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +8 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang_version.hpp +8 -2
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/codegear.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/common_edg.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/cray.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/digitalmars.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc_xml.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/hp_acc.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/intel.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/metrowerks.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/mpw.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/nvcc.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pathscale.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/vacpp.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +13 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +8 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp_zos.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/detail/cxx_composite.hpp +16 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/detail/suffix.hpp +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +16 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +6 -7
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +18 -19
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +27 -29
- data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +0 -29
- data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +144 -145
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +4 -5
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +48 -49
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_helpers.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/allocator_version_traits.hpp +14 -15
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +22 -22
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +71 -69
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/destroyers.hpp +48 -48
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +38 -40
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +165 -153
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +162 -163
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/math_functions.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +48 -12
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/next_capacity.hpp +6 -8
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +44 -46
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool_impl.hpp +10 -11
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +18 -19
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/placement_new.hpp +0 -8
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/transform_iterator.hpp +28 -28
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +83 -84
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/value_init.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +77 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/devector.hpp +81 -85
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +231 -233
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +86 -86
- data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +33 -33
- data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +107 -110
- data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +9 -11
- data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +10 -11
- data/src/cxx_supportlib/vendor-modified/boost/container/node_handle.hpp +29 -17
- data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/memory_resource.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/polymorphic_allocator.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/resource_adaptor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator.hpp +80 -82
- data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +81 -81
- data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +24 -26
- data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +147 -122
- data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +109 -110
- data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +32 -32
- data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +165 -194
- data/src/cxx_supportlib/vendor-modified/boost/container/throw_exception.hpp +4 -5
- data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +263 -199
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_integral.hpp +146 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_mix.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_range.hpp +296 -61
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_tuple_like.hpp +62 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/mulx.hpp +79 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash.hpp +38 -124
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/hash_fwd.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_contiguous_range.hpp +27 -20
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_described_class.hpp +4 -5
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_range.hpp +8 -40
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_tuple_like.hpp +36 -0
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/is_unordered_range.hpp +6 -7
- data/src/cxx_supportlib/vendor-modified/boost/core/alignof.hpp +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/allocator_access.hpp +22 -8
- data/src/cxx_supportlib/vendor-modified/boost/core/bit.hpp +362 -31
- data/src/cxx_supportlib/vendor-modified/boost/core/checked_delete.hpp +29 -3
- data/src/cxx_supportlib/vendor-modified/boost/core/data.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/is_same.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/lwt_unattended.hpp +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/sp_thread_pause.hpp +71 -0
- data/src/cxx_supportlib/vendor-modified/boost/{smart_ptr → core}/detail/sp_thread_sleep.hpp +39 -21
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/sp_thread_yield.hpp +100 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/detail/string_view.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/core/fclose_deleter.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/functor.hpp +41 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/identity.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/invoke_swap.hpp +93 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/is_same.hpp +10 -15
- data/src/cxx_supportlib/vendor-modified/boost/core/launder.hpp +69 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +33 -36
- data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test_trait.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/core/make_span.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/max_align.hpp +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/memory_resource.hpp +108 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/null_deleter.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/ref.hpp +23 -16
- data/src/cxx_supportlib/vendor-modified/boost/core/serialization.hpp +131 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/size.hpp +31 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/snprintf.hpp +173 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/span.hpp +17 -17
- data/src/cxx_supportlib/vendor-modified/boost/core/swap.hpp +10 -40
- data/src/cxx_supportlib/vendor-modified/boost/core/type_name.hpp +29 -5
- data/src/cxx_supportlib/vendor-modified/boost/core/yield_primitives.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/describe/members.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/detail/basic_pointerbuf.hpp +3 -6
- data/src/cxx_supportlib/vendor-modified/boost/detail/lcast_precision.hpp +6 -97
- data/src/cxx_supportlib/vendor-modified/boost/exception/current_exception_cast.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/clone_current_exception.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/error_info_impl.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/exception_ptr.hpp +22 -10
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/is_output_streamable.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/object_hex_dump.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/requires_cxx11.hpp +24 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/type_info.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/diagnostic_information.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/exception/exception.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/get_error_info.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/info.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/to_string.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/exception/to_string_stub.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/function/function0.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/function/function1.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/function/function10.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/function/function2.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/function/function3.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/function/function4.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/function/function5.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/function/function6.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/function/function7.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/function/function8.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/function/function9.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +49 -198
- data/src/cxx_supportlib/vendor-modified/boost/function/function_fwd.hpp +36 -41
- data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +277 -420
- data/src/cxx_supportlib/vendor-modified/boost/function/function_typeof.hpp +1 -31
- data/src/cxx_supportlib/vendor-modified/boost/function.hpp +5 -61
- data/src/cxx_supportlib/vendor-modified/boost/integer/extended_euclidean.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set.hpp +24 -25
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree.hpp +12 -13
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree_algorithms.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set.hpp +24 -25
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +65 -66
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree_algorithms.hpp +20 -20
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_list_algorithms.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_slist_algorithms.hpp +10 -10
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/any_node_and_algorithms.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/array_initializer.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/common_slist_algorithms.hpp +10 -10
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/default_header_holder.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +24 -24
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/equal_to_value.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/exception_disposer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/generic_hook.hpp +14 -15
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hash.hpp +277 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hash_combine.hpp +11 -49
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hash_integral.hpp +119 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hash_mix.hpp +130 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hashtable_node.hpp +41 -41
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +14 -20
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iiterator.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iterator.hpp +12 -12
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/key_nodeptr_comp.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_iterator.hpp +19 -19
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/mpl.hpp +6 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/node_cloner_disposer.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/parent_from_member.hpp +6 -17
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/simple_disposers.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp +14 -14
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_iterator.hpp +20 -20
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/transform_iterator.hpp +22 -22
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_iterator.hpp +21 -21
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_value_compare.hpp +28 -28
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +58 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +268 -239
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/linear_slist_algorithms.hpp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +57 -58
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pack_options.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_traits.hpp +18 -18
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/priority_compare.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree.hpp +12 -13
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/set.hpp +24 -25
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sg_set.hpp +24 -25
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree.hpp +14 -15
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree_algorithms.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +61 -62
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splay_set.hpp +24 -25
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree.hpp +12 -13
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap.hpp +18 -19
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_set.hpp +36 -37
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set.hpp +37 -34
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set_hook.hpp +11 -11
- data/src/cxx_supportlib/vendor-modified/boost/io/ios_state.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/facade_iterator_category.hpp +10 -11
- data/src/cxx_supportlib/vendor-modified/boost/iterator/is_iterator.hpp +148 -0
- data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_concepts.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +7 -13
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/buffer_view.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +113 -131
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +612 -645
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +85 -79
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +25 -32
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +22 -29
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_basic_unlockedbuf.hpp +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +21 -16
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +7 -9
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +22 -161
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +9 -12
- data/src/cxx_supportlib/vendor-modified/boost/libs/chrono/src/chrono.cpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/libs/chrono/src/process_cpu_clocks.cpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/libs/chrono/src/thread_clock.cpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/posix_api.cpp +10 -18
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wide_posix_api.cpp +13 -14
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +24 -14
- data/src/cxx_supportlib/vendor-modified/boost/limits.hpp +12 -12
- data/src/cxx_supportlib/vendor-modified/boost/move/adl_move_swap.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_merge.hpp +5 -3
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_sort.hpp +20 -19
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +41 -56
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/basic_op.hpp +11 -10
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/heap_sort.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge.hpp +32 -34
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/move.hpp +4 -5
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/predicate.hpp +11 -11
- data/src/cxx_supportlib/vendor-modified/boost/move/algorithm.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/core.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/move/default_delete.hpp +5 -6
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/iterator_to_raw_pointer.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/move_helpers.hpp +24 -24
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/nsec_clock.hpp +65 -24
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/reverse_iterator.hpp +28 -28
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/to_raw_pointer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +72 -23
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +81 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/iterator.hpp +22 -22
- data/src/cxx_supportlib/vendor-modified/boost/move/unique_ptr.hpp +65 -66
- data/src/cxx_supportlib/vendor-modified/boost/move/utility.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/move/utility_core.hpp +8 -6
- data/src/cxx_supportlib/vendor-modified/boost/mp11/algorithm.hpp +97 -17
- data/src/cxx_supportlib/vendor-modified/boost/mp11/bind.hpp +9 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/config.hpp +11 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_append.hpp +140 -4
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_defer.hpp +119 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_fold.hpp +108 -4
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_front.hpp +13 -1
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_is_value_list.hpp +41 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_list_v.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_map_find.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_plus.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_rename.hpp +18 -5
- data/src/cxx_supportlib/vendor-modified/boost/mp11/detail/mp_value.hpp +25 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/integer_sequence.hpp +9 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/integral.hpp +10 -0
- data/src/cxx_supportlib/vendor-modified/boost/mp11/list.hpp +180 -3
- data/src/cxx_supportlib/vendor-modified/boost/mp11/utility.hpp +2 -96
- data/src/cxx_supportlib/vendor-modified/boost/mp11/version.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/mpl/assert.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/next_prior.hpp +3 -44
- data/src/cxx_supportlib/vendor-modified/boost/nondet_random.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/none_t.hpp +8 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/old_optional_implementation.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_config.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_relops.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_swap.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_trivially_copyable_base.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/tag_keyword_arg_ref.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/pack/unmatched_argument.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/preprocessor/overloads.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/tag.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/unwrap_cv_reference.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/void.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/parameter/binding.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/parameter/match.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/parameter/template_keyword.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/parameter/value_type.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/pool/pool.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/pool/simple_segregated_storage.hpp +13 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/msvc.h +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std.h +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/make.h +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/vms.h +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/has_opt.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/inversive_congruential.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/random/splitmix64.hpp +203 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/subtract_with_carry.hpp +14 -14
- data/src/cxx_supportlib/vendor-modified/boost/random/uniform_real_distribution.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/random.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/config.hpp +4 -82
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/gcd_lcm.hpp +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/is_evenly_divisible_by.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/is_ratio.hpp +28 -0
- data/src/cxx_supportlib/vendor-modified/boost/ratio/include.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/ratio/ratio.hpp +5 -249
- data/src/cxx_supportlib/vendor-modified/boost/ratio/ratio_fwd.hpp +30 -56
- data/src/cxx_supportlib/vendor-modified/boost/ratio/ratio_io.hpp +0 -533
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/regex/v5/icu.hpp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/regex/v5/regex_workaround.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/requires_cxx11.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/yield_k.hpp +4 -6
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/enable_shared_from_this.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +2 -11
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_array.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_object.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_unique.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_array.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_array.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +1 -11
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/weak_ptr.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/config.hpp +4 -8
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/enable_if.hpp +3 -12
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category.hpp +14 -50
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_category_impl.hpp +16 -55
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_code.hpp +62 -124
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_condition.hpp +29 -52
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/generic_category.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/generic_category_message.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/interop_category.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/is_same.hpp +3 -13
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/mutex.hpp +128 -0
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/snprintf.hpp +1 -46
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/std_category.hpp +14 -13
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/std_category_impl.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/system_category.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/system_category_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/system_category_message.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/system/errc.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/system/system_error.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/deque.hpp +1 -24
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/functional.hpp +1 -14
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/list.hpp +1 -14
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/allocator_arg.hpp +2 -12
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/allocator_traits.hpp +0 -11
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/config.hpp +0 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/default_delete.hpp +0 -16
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/pointer_traits.hpp +0 -11
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/scoped_allocator.hpp +0 -11
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/shared_ptr.hpp +0 -19
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/unique_ptr.hpp +4 -6
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/queue.hpp +2 -26
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/tuple.hpp +1 -18
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/vector.hpp +1 -14
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/invoke.hpp +11 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/string_to_unsigned.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/string_trim.hpp +29 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/externally_locked.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/futures/wait_for_any.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/synchronized_value.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/throw_exception.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/tuple/detail/tuple_basic.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/tuple/tuple.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_swappable_cxx_11.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_floating_point.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_integral.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_swappable.hpp +4 -24
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_swappable.hpp +92 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/decltype.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/typeof/incr_registration_group.hpp +1 -10
- data/src/cxx_supportlib/vendor-modified/boost/typeof/msvc/typeof_impl.hpp +5 -6
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/bitset.hpp +2 -4
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/complex.hpp +2 -4
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/deque.hpp +2 -5
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/fstream.hpp +2 -15
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/functional.hpp +4 -51
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/iostream.hpp +2 -6
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/istream.hpp +2 -9
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/iterator.hpp +2 -46
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/list.hpp +2 -5
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/locale.hpp +2 -29
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/map.hpp +2 -9
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/memory.hpp +4 -9
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/ostream.hpp +2 -6
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/queue.hpp +2 -5
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/set.hpp +2 -9
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/sstream.hpp +2 -19
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/stack.hpp +2 -5
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/streambuf.hpp +2 -5
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/string.hpp +2 -12
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/utility.hpp +2 -4
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/valarray.hpp +2 -10
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/vector.hpp +2 -5
- data/src/cxx_supportlib/vendor-modified/boost/typeof/typeof.hpp +8 -202
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map.hpp +860 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_map_fwd.hpp +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_set.hpp +716 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/concurrent_flat_set_fwd.hpp +52 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/allocator_constructed.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/archive_constructed.hpp +71 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/bad_archive_exception.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/concurrent_static_asserts.hpp +105 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fca.hpp +120 -85
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/concurrent_table.hpp +1764 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/core.hpp +2271 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/element_type.hpp +64 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/flat_map_types.hpp +86 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/flat_set_types.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/ignore_wshadow.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_handle.hpp +204 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_map_types.hpp +139 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/node_set_types.hpp +92 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/reentrancy_check.hpp +138 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/restore_wshadow.hpp +11 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/rw_spinlock.hpp +179 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/table.hpp +651 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa/tuple_rotate_right.hpp +52 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +356 -1118
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/map.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/mulx.hpp +129 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/narrow_cast.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/opt_storage.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/prime_fmod.hpp +96 -150
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/serialization_version.hpp +74 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/serialize_container.hpp +204 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/serialize_fca_container.hpp +156 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/serialize_tracked_address.hpp +104 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/static_assert.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/throw_exception.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/type_traits.hpp +136 -19
- data/src/cxx_supportlib/vendor-modified/boost/unordered/hash_traits.hpp +4 -5
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map.hpp +171 -103
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_map_fwd.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set.hpp +70 -46
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_flat_set_fwd.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +406 -899
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map_fwd.hpp +7 -13
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map.hpp +895 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_map_fwd.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set.hpp +699 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_node_set_fwd.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +253 -618
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set_fwd.hpp +8 -14
- data/src/cxx_supportlib/vendor-modified/boost/utility/swap.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/utility/value_init.hpp +8 -8
- data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/jsoncpp/jsoncpp.cpp +2 -9
- data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/frame.hpp +0 -11
- data/src/cxx_supportlib/vendor-modified/websocketpp/websocketpp/processors/hybi13.hpp +14 -20
- data/src/helper-scripts/wsgi-loader.py +2 -2
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.c +2 -2
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +16 -5
- data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +3 -1
- data/src/ruby_supportlib/phusion_passenger/native_support.rb +10 -7
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +8 -10
- data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +14 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +4 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/libs.rb +6 -6
- data/src/ruby_supportlib/phusion_passenger/platform_info/pcre.rb +11 -12
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/app.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/gdb_controller.rb +4 -0
- data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/lldb_controller.rb +5 -1
- data/src/ruby_supportlib/phusion_passenger.rb +8 -8
- metadata +109 -150
- data/src/cxx_supportlib/ServerKit/http_parser.cpp +0 -2265
- data/src/cxx_supportlib/ServerKit/http_parser.h +0 -330
- data/src/cxx_supportlib/vendor-modified/boost/array.hpp +0 -456
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/bulk_executor_op.hpp +0 -90
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_arm_fenced_block.hpp +0 -93
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_hppa_fenced_block.hpp +0 -70
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_sync_fenced_block.hpp +0 -67
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/gcc_x86_fenced_block.hpp +0 -101
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/handler_invoke_helpers.hpp +0 -80
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/macos_fenced_block.hpp +0 -64
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/old_win_sdk_compat.hpp +0 -216
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/solaris_fenced_block.hpp +0 -64
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/variadic_templates.hpp +0 -294
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_execute.hpp +0 -406
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/bulk_guarantee.hpp +0 -1254
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/connect.hpp +0 -498
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_invocable.hpp +0 -154
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_operation.hpp +0 -111
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/as_receiver.hpp +0 -130
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/bulk_sender.hpp +0 -263
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/submit_receiver.hpp +0 -235
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/detail/void_receiver.hpp +0 -92
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/execute.hpp +0 -296
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/impl/receiver_invocation_error.ipp +0 -38
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/operation_state.hpp +0 -101
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver.hpp +0 -287
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/receiver_invocation_error.hpp +0 -50
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/schedule.hpp +0 -296
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/scheduler.hpp +0 -93
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/sender.hpp +0 -318
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_done.hpp +0 -259
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_error.hpp +0 -259
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/set_value.hpp +0 -492
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/start.hpp +0 -256
- data/src/cxx_supportlib/vendor-modified/boost/asio/execution/submit.hpp +0 -459
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_alloc_hook.hpp +0 -106
- data/src/cxx_supportlib/vendor-modified/boost/asio/handler_invoke_hook.hpp +0 -113
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/defer.hpp +0 -300
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/dispatch.hpp +0 -275
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/handler_alloc_hook.ipp +0 -64
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/post.hpp +0 -300
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/bulk_execute_free.hpp +0 -116
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/bulk_execute_member.hpp +0 -116
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/connect_free.hpp +0 -114
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/connect_member.hpp +0 -114
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/execute_free.hpp +0 -110
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/schedule_free.hpp +0 -110
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/schedule_member.hpp +0 -110
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_done_free.hpp +0 -110
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_done_member.hpp +0 -110
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_error_free.hpp +0 -114
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_error_member.hpp +0 -114
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_value_free.hpp +0 -236
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/set_value_member.hpp +0 -236
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/start_free.hpp +0 -110
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/start_member.hpp +0 -110
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/submit_free.hpp +0 -114
- data/src/cxx_supportlib/vendor-modified/boost/asio/traits/submit_member.hpp +0 -114
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_object_handle.hpp +0 -495
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_overlapped_handle.hpp +0 -462
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_random_access_handle.hpp +0 -581
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/basic_stream_handle.hpp +0 -563
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/object_handle.hpp +0 -40
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_handle.hpp +0 -41
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/overlapped_ptr.hpp +0 -147
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/random_access_handle.hpp +0 -39
- data/src/cxx_supportlib/vendor-modified/boost/asio/windows/stream_handle.hpp +0 -39
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/core_ops_windows.hpp +0 -201
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/fence_ops_windows.hpp +0 -67
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_caps_windows.hpp +0 -57
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/wait_ops_windows.hpp +0 -179
- data/src/cxx_supportlib/vendor-modified/boost/bind/bind_mf2_cc.hpp +0 -228
- data/src/cxx_supportlib/vendor-modified/boost/bind/bind_mf_cc.hpp +0 -441
- data/src/cxx_supportlib/vendor-modified/boost/bind/bind_template.hpp +0 -345
- data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn_cc.hpp +0 -103
- data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn_template.hpp +0 -1047
- data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn_vw.hpp +0 -130
- data/src/cxx_supportlib/vendor-modified/boost/bind/storage.hpp +0 -475
- data/src/cxx_supportlib/vendor-modified/boost/config/platform/cygwin.hpp +0 -71
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/hash_table.hpp +0 -1278
- data/src/cxx_supportlib/vendor-modified/boost/container_hash/detail/hash_tuple.hpp +0 -133
- data/src/cxx_supportlib/vendor-modified/boost/detail/atomic_count.hpp +0 -21
- data/src/cxx_supportlib/vendor-modified/boost/function/detail/function_iterate.hpp +0 -16
- data/src/cxx_supportlib/vendor-modified/boost/function/detail/gen_maybe_include.pl +0 -39
- data/src/cxx_supportlib/vendor-modified/boost/function/detail/maybe_include.hpp +0 -369
- data/src/cxx_supportlib/vendor-modified/boost/function/detail/prologue.hpp +0 -26
- data/src/cxx_supportlib/vendor-modified/boost/function/gen_function_N.pl +0 -26
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash_fwd.hpp +0 -6
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/mpl/abs.hpp +0 -89
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/mpl/gcd.hpp +0 -124
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/mpl/lcm.hpp +0 -126
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/mpl/sign.hpp +0 -89
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/overflow_helpers.hpp +0 -367
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/ratio_io.hpp +0 -1342
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/abs.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/arithmetic.hpp +0 -22
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/comparison.hpp +0 -19
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/divides.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/equal_to.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/gcd.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/greater.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/greater_equal.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/lcm.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/less.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/less_equal.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/minus.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/negate.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/not_equal_to.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/numeric_cast.hpp +0 -31
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/plus.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/rational_c_tag.hpp +0 -25
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/rational_constant.hpp +0 -15
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/sign.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/ratio/mpl/times.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_thread_pause.hpp +0 -51
- data/src/cxx_supportlib/vendor-modified/boost/swap.hpp +0 -17
- data/src/cxx_supportlib/vendor-modified/boost/type_index/stl_type_index.hpp +0 -278
- data/src/cxx_supportlib/vendor-modified/boost/type_index/type_index_facade.hpp +0 -297
- data/src/cxx_supportlib/vendor-modified/boost/type_index.hpp +0 -265
- data/src/cxx_supportlib/vendor-modified/boost/typeof/dmc/typeof_impl.hpp +0 -100
- data/src/cxx_supportlib/vendor-modified/boost/typeof/encode_decode.hpp +0 -58
- data/src/cxx_supportlib/vendor-modified/boost/typeof/encode_decode_params.hpp +0 -34
- data/src/cxx_supportlib/vendor-modified/boost/typeof/int_encoding.hpp +0 -118
- data/src/cxx_supportlib/vendor-modified/boost/typeof/integral_template_param.hpp +0 -80
- data/src/cxx_supportlib/vendor-modified/boost/typeof/message.hpp +0 -8
- data/src/cxx_supportlib/vendor-modified/boost/typeof/modifiers.hpp +0 -121
- data/src/cxx_supportlib/vendor-modified/boost/typeof/native.hpp +0 -60
- data/src/cxx_supportlib/vendor-modified/boost/typeof/pointers_data_members.hpp +0 -38
- data/src/cxx_supportlib/vendor-modified/boost/typeof/register_functions.hpp +0 -50
- data/src/cxx_supportlib/vendor-modified/boost/typeof/register_functions_iterate.hpp +0 -135
- data/src/cxx_supportlib/vendor-modified/boost/typeof/register_fundamental.hpp +0 -61
- data/src/cxx_supportlib/vendor-modified/boost/typeof/register_mem_functions.hpp +0 -32
- data/src/cxx_supportlib/vendor-modified/boost/typeof/template_encoding.hpp +0 -160
- data/src/cxx_supportlib/vendor-modified/boost/typeof/template_template_param.hpp +0 -149
- data/src/cxx_supportlib/vendor-modified/boost/typeof/type_encoding.hpp +0 -27
- data/src/cxx_supportlib/vendor-modified/boost/typeof/type_template_param.hpp +0 -37
- data/src/cxx_supportlib/vendor-modified/boost/typeof/typeof_impl.hpp +0 -187
- data/src/cxx_supportlib/vendor-modified/boost/typeof/unsupported.hpp +0 -29
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector.hpp +0 -166
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector100.hpp +0 -321
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector150.hpp +0 -471
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector200.hpp +0 -621
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector50.hpp +0 -171
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/foa.hpp +0 -1921
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fwd.hpp +0 -64
- /data/dev/{webpacketpp.patch → websocketpp.patch} +0 -0
@@ -1,2265 +0,0 @@
|
|
1
|
-
/* Based on src/http/ngx_http_parse.c from NGINX copyright Igor Sysoev
|
2
|
-
*
|
3
|
-
* Additional changes are licensed under the same terms as NGINX and
|
4
|
-
* copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
5
|
-
*
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
-
* of this software and associated documentation files (the "Software"), to
|
8
|
-
* deal in the Software without restriction, including without limitation the
|
9
|
-
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
10
|
-
* sell copies of the Software, and to permit persons to whom the Software is
|
11
|
-
* furnished to do so, subject to the following conditions:
|
12
|
-
*
|
13
|
-
* The above copyright notice and this permission notice shall be included in
|
14
|
-
* all copies or substantial portions of the Software.
|
15
|
-
*
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
-
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
22
|
-
* IN THE SOFTWARE.
|
23
|
-
*/
|
24
|
-
#include <ServerKit/http_parser.h>
|
25
|
-
#include <assert.h>
|
26
|
-
#include <stddef.h>
|
27
|
-
#include <ctype.h>
|
28
|
-
#include <stdlib.h>
|
29
|
-
#include <string.h>
|
30
|
-
#include <limits.h>
|
31
|
-
|
32
|
-
#ifndef ULLONG_MAX
|
33
|
-
# define ULLONG_MAX ((boost::uint64_t) -1) /* 2^64-1 */
|
34
|
-
#endif
|
35
|
-
|
36
|
-
#ifndef MIN
|
37
|
-
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
38
|
-
#endif
|
39
|
-
|
40
|
-
#ifndef ARRAY_SIZE
|
41
|
-
# define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
42
|
-
#endif
|
43
|
-
|
44
|
-
#ifndef BIT_AT
|
45
|
-
# define BIT_AT(a, i) \
|
46
|
-
(!!((unsigned int) (a)[(unsigned int) (i) >> 3] & \
|
47
|
-
(1 << ((unsigned int) (i) & 7))))
|
48
|
-
#endif
|
49
|
-
|
50
|
-
#ifndef ELEM_AT
|
51
|
-
# define ELEM_AT(a, i, v) ((unsigned int) (i) < ARRAY_SIZE(a) ? (a)[(i)] : (v))
|
52
|
-
#endif
|
53
|
-
|
54
|
-
#define SET_ERRNO(e) \
|
55
|
-
do { \
|
56
|
-
parser->http_errno = (e); \
|
57
|
-
} while(0)
|
58
|
-
|
59
|
-
|
60
|
-
/* Run the notify callback FOR, returning ER if it fails */
|
61
|
-
#define CALLBACK_NOTIFY_(FOR, ER) \
|
62
|
-
do { \
|
63
|
-
assert(HTTP_PARSER_ERRNO(parser) == HPE_OK); \
|
64
|
-
\
|
65
|
-
if (settings->on_##FOR) { \
|
66
|
-
if (0 != settings->on_##FOR(parser)) { \
|
67
|
-
SET_ERRNO(HPE_CB_##FOR); \
|
68
|
-
} \
|
69
|
-
\
|
70
|
-
/* We either errored above or got paused; get out */ \
|
71
|
-
if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { \
|
72
|
-
return (ER); \
|
73
|
-
} \
|
74
|
-
} \
|
75
|
-
} while (0)
|
76
|
-
|
77
|
-
/* Run the notify callback FOR and consume the current byte */
|
78
|
-
#define CALLBACK_NOTIFY(FOR) CALLBACK_NOTIFY_(FOR, p - data + 1)
|
79
|
-
|
80
|
-
/* Run the notify callback FOR and don't consume the current byte */
|
81
|
-
#define CALLBACK_NOTIFY_NOADVANCE(FOR) CALLBACK_NOTIFY_(FOR, p - data)
|
82
|
-
|
83
|
-
/* Run data callback FOR with LEN bytes, returning ER if it fails */
|
84
|
-
#define CALLBACK_DATA_(FOR, LEN, ER) \
|
85
|
-
do { \
|
86
|
-
assert(HTTP_PARSER_ERRNO(parser) == HPE_OK); \
|
87
|
-
\
|
88
|
-
if (FOR##_mark) { \
|
89
|
-
if (settings->on_##FOR) { \
|
90
|
-
if (0 != settings->on_##FOR(parser, FOR##_mark, (LEN))) { \
|
91
|
-
SET_ERRNO(HPE_CB_##FOR); \
|
92
|
-
} \
|
93
|
-
\
|
94
|
-
/* We either errored above or got paused; get out */ \
|
95
|
-
if (HTTP_PARSER_ERRNO(parser) != HPE_OK) { \
|
96
|
-
return (ER); \
|
97
|
-
} \
|
98
|
-
} \
|
99
|
-
FOR##_mark = NULL; \
|
100
|
-
} \
|
101
|
-
} while (0)
|
102
|
-
|
103
|
-
/* Run the data callback FOR and consume the current byte */
|
104
|
-
#define CALLBACK_DATA(FOR) \
|
105
|
-
CALLBACK_DATA_(FOR, p - FOR##_mark, p - data + 1)
|
106
|
-
|
107
|
-
/* Run the data callback FOR and don't consume the current byte */
|
108
|
-
#define CALLBACK_DATA_NOADVANCE(FOR) \
|
109
|
-
CALLBACK_DATA_(FOR, p - FOR##_mark, p - data)
|
110
|
-
|
111
|
-
/* Set the mark FOR; non-destructive if mark is already set */
|
112
|
-
#define MARK(FOR) \
|
113
|
-
do { \
|
114
|
-
if (!FOR##_mark) { \
|
115
|
-
FOR##_mark = p; \
|
116
|
-
} \
|
117
|
-
} while (0)
|
118
|
-
|
119
|
-
|
120
|
-
#define PROXY_CONNECTION "proxy-connection"
|
121
|
-
#define CONNECTION "connection"
|
122
|
-
#define CONTENT_LENGTH "content-length"
|
123
|
-
#define TRANSFER_ENCODING "transfer-encoding"
|
124
|
-
#define UPGRADE "upgrade"
|
125
|
-
#define CHUNKED "chunked"
|
126
|
-
#define KEEP_ALIVE "keep-alive"
|
127
|
-
#define CLOSE "close"
|
128
|
-
|
129
|
-
|
130
|
-
static const char *method_strings[] =
|
131
|
-
{
|
132
|
-
#define XX(num, name, string) #string,
|
133
|
-
HTTP_METHOD_MAP(XX)
|
134
|
-
#undef XX
|
135
|
-
};
|
136
|
-
|
137
|
-
|
138
|
-
/* Tokens as defined by rfc 2616. Also lowercases them.
|
139
|
-
* token = 1*<any CHAR except CTLs or separators>
|
140
|
-
* separators = "(" | ")" | "<" | ">" | "@"
|
141
|
-
* | "," | ";" | ":" | "\" | <">
|
142
|
-
* | "/" | "[" | "]" | "?" | "="
|
143
|
-
* | "{" | "}" | SP | HT
|
144
|
-
*/
|
145
|
-
static const char tokens[256] = {
|
146
|
-
/* 0 nul 1 soh 2 stx 3 etx 4 eot 5 enq 6 ack 7 bel */
|
147
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
148
|
-
/* 8 bs 9 ht 10 nl 11 vt 12 np 13 cr 14 so 15 si */
|
149
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
150
|
-
/* 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb */
|
151
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
152
|
-
/* 24 can 25 em 26 sub 27 esc 28 fs 29 gs 30 rs 31 us */
|
153
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
154
|
-
/* 32 sp 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' */
|
155
|
-
0, '!', 0, '#', '$', '%', '&', '\'',
|
156
|
-
/* 40 ( 41 ) 42 * 43 + 44 , 45 - 46 . 47 / */
|
157
|
-
0, 0, '*', '+', 0, '-', '.', 0,
|
158
|
-
/* 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 */
|
159
|
-
'0', '1', '2', '3', '4', '5', '6', '7',
|
160
|
-
/* 56 8 57 9 58 : 59 ; 60 < 61 = 62 > 63 ? */
|
161
|
-
'8', '9', 0, 0, 0, 0, 0, 0,
|
162
|
-
/* 64 @ 65 A 66 B 67 C 68 D 69 E 70 F 71 G */
|
163
|
-
0, 'a', 'b', 'c', 'd', 'e', 'f', 'g',
|
164
|
-
/* 72 H 73 I 74 J 75 K 76 L 77 M 78 N 79 O */
|
165
|
-
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
|
166
|
-
/* 80 P 81 Q 82 R 83 S 84 T 85 U 86 V 87 W */
|
167
|
-
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
|
168
|
-
/* 88 X 89 Y 90 Z 91 [ 92 \ 93 ] 94 ^ 95 _ */
|
169
|
-
'x', 'y', 'z', 0, 0, 0, '^', '_',
|
170
|
-
/* 96 ` 97 a 98 b 99 c 100 d 101 e 102 f 103 g */
|
171
|
-
'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
|
172
|
-
/* 104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o */
|
173
|
-
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
|
174
|
-
/* 112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w */
|
175
|
-
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
|
176
|
-
/* 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 del */
|
177
|
-
'x', 'y', 'z', 0, '|', 0, '~', 0 };
|
178
|
-
|
179
|
-
|
180
|
-
static const int8_t unhex[256] =
|
181
|
-
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
182
|
-
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
183
|
-
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
184
|
-
, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1
|
185
|
-
,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
186
|
-
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
187
|
-
,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
188
|
-
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
189
|
-
};
|
190
|
-
|
191
|
-
|
192
|
-
#if HTTP_PARSER_STRICT
|
193
|
-
# define T(v) 0
|
194
|
-
#else
|
195
|
-
# define T(v) v
|
196
|
-
#endif
|
197
|
-
|
198
|
-
|
199
|
-
static const boost::uint8_t normal_url_char[32] = {
|
200
|
-
/* 0 nul 1 soh 2 stx 3 etx 4 eot 5 enq 6 ack 7 bel */
|
201
|
-
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0,
|
202
|
-
/* 8 bs 9 ht 10 nl 11 vt 12 np 13 cr 14 so 15 si */
|
203
|
-
0 | T(2) | 0 | 0 | T(16) | 0 | 0 | 0,
|
204
|
-
/* 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb */
|
205
|
-
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0,
|
206
|
-
/* 24 can 25 em 26 sub 27 esc 28 fs 29 gs 30 rs 31 us */
|
207
|
-
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0,
|
208
|
-
/* 32 sp 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' */
|
209
|
-
0 | 2 | 4 | 0 | 16 | 32 | 64 | 128,
|
210
|
-
/* 40 ( 41 ) 42 * 43 + 44 , 45 - 46 . 47 / */
|
211
|
-
1 | 2 | 4 | 8 | 16 | 32 | 64 | 128,
|
212
|
-
/* 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 */
|
213
|
-
1 | 2 | 4 | 8 | 16 | 32 | 64 | 128,
|
214
|
-
/* 56 8 57 9 58 : 59 ; 60 < 61 = 62 > 63 ? */
|
215
|
-
1 | 2 | 4 | 8 | 16 | 32 | 64 | 0,
|
216
|
-
/* 64 @ 65 A 66 B 67 C 68 D 69 E 70 F 71 G */
|
217
|
-
1 | 2 | 4 | 8 | 16 | 32 | 64 | 128,
|
218
|
-
/* 72 H 73 I 74 J 75 K 76 L 77 M 78 N 79 O */
|
219
|
-
1 | 2 | 4 | 8 | 16 | 32 | 64 | 128,
|
220
|
-
/* 80 P 81 Q 82 R 83 S 84 T 85 U 86 V 87 W */
|
221
|
-
1 | 2 | 4 | 8 | 16 | 32 | 64 | 128,
|
222
|
-
/* 88 X 89 Y 90 Z 91 [ 92 \ 93 ] 94 ^ 95 _ */
|
223
|
-
1 | 2 | 4 | 8 | 16 | 32 | 64 | 128,
|
224
|
-
/* 96 ` 97 a 98 b 99 c 100 d 101 e 102 f 103 g */
|
225
|
-
1 | 2 | 4 | 8 | 16 | 32 | 64 | 128,
|
226
|
-
/* 104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o */
|
227
|
-
1 | 2 | 4 | 8 | 16 | 32 | 64 | 128,
|
228
|
-
/* 112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w */
|
229
|
-
1 | 2 | 4 | 8 | 16 | 32 | 64 | 128,
|
230
|
-
/* 120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 del */
|
231
|
-
1 | 2 | 4 | 8 | 16 | 32 | 64 | 0, };
|
232
|
-
|
233
|
-
#undef T
|
234
|
-
|
235
|
-
enum state
|
236
|
-
{ s_dead = 1 /* important that this is > 0 */
|
237
|
-
|
238
|
-
, s_start_req_or_res
|
239
|
-
, s_res_or_resp_H
|
240
|
-
, s_start_res
|
241
|
-
, s_res_H
|
242
|
-
, s_res_HT
|
243
|
-
, s_res_HTT
|
244
|
-
, s_res_HTTP
|
245
|
-
, s_res_first_http_major
|
246
|
-
, s_res_http_major
|
247
|
-
, s_res_first_http_minor
|
248
|
-
, s_res_http_minor
|
249
|
-
, s_res_first_status_code
|
250
|
-
, s_res_status_code
|
251
|
-
, s_res_status_start
|
252
|
-
, s_res_status
|
253
|
-
, s_res_line_almost_done
|
254
|
-
|
255
|
-
, s_start_req
|
256
|
-
|
257
|
-
, s_req_method
|
258
|
-
, s_req_spaces_before_url
|
259
|
-
, s_req_schema
|
260
|
-
, s_req_schema_slash
|
261
|
-
, s_req_schema_slash_slash
|
262
|
-
, s_req_server_start
|
263
|
-
, s_req_server
|
264
|
-
, s_req_server_with_at
|
265
|
-
, s_req_path
|
266
|
-
, s_req_query_string_start
|
267
|
-
, s_req_query_string
|
268
|
-
, s_req_fragment_start
|
269
|
-
, s_req_fragment
|
270
|
-
, s_req_http_start
|
271
|
-
, s_req_http_H
|
272
|
-
, s_req_http_HT
|
273
|
-
, s_req_http_HTT
|
274
|
-
, s_req_http_HTTP
|
275
|
-
, s_req_first_http_major
|
276
|
-
, s_req_http_major
|
277
|
-
, s_req_first_http_minor
|
278
|
-
, s_req_http_minor
|
279
|
-
, s_req_line_almost_done
|
280
|
-
|
281
|
-
, s_header_field_start
|
282
|
-
, s_header_field
|
283
|
-
, s_header_value_discard_ws
|
284
|
-
, s_header_value_discard_ws_almost_done
|
285
|
-
, s_header_value_discard_lws
|
286
|
-
, s_header_value_start
|
287
|
-
, s_header_value
|
288
|
-
, s_header_value_lws
|
289
|
-
|
290
|
-
, s_header_almost_done
|
291
|
-
|
292
|
-
, s_chunk_size_start
|
293
|
-
, s_chunk_size
|
294
|
-
, s_chunk_parameters
|
295
|
-
, s_chunk_size_almost_done
|
296
|
-
|
297
|
-
, s_headers_almost_done
|
298
|
-
, s_headers_done
|
299
|
-
|
300
|
-
/* Important: 's_headers_done' must be the last 'header' state. All
|
301
|
-
* states beyond this must be 'body' states. It is used for overflow
|
302
|
-
* checking. See the PARSING_HEADER() macro.
|
303
|
-
*/
|
304
|
-
|
305
|
-
, s_chunk_data
|
306
|
-
, s_chunk_data_almost_done
|
307
|
-
, s_chunk_data_done
|
308
|
-
|
309
|
-
, s_body_identity
|
310
|
-
, s_body_identity_eof
|
311
|
-
|
312
|
-
, s_message_done
|
313
|
-
};
|
314
|
-
|
315
|
-
|
316
|
-
#define PARSING_HEADER(state) (state <= s_headers_done)
|
317
|
-
|
318
|
-
|
319
|
-
enum header_states
|
320
|
-
{ h_general = 0
|
321
|
-
, h_C
|
322
|
-
, h_CO
|
323
|
-
, h_CON
|
324
|
-
|
325
|
-
, h_matching_connection
|
326
|
-
, h_matching_proxy_connection
|
327
|
-
, h_matching_content_length
|
328
|
-
, h_matching_transfer_encoding
|
329
|
-
, h_matching_upgrade
|
330
|
-
|
331
|
-
, h_connection
|
332
|
-
, h_content_length
|
333
|
-
, h_transfer_encoding
|
334
|
-
, h_upgrade
|
335
|
-
|
336
|
-
, h_matching_transfer_encoding_chunked
|
337
|
-
, h_matching_connection_keep_alive
|
338
|
-
, h_matching_connection_close
|
339
|
-
|
340
|
-
, h_transfer_encoding_chunked
|
341
|
-
, h_connection_keep_alive
|
342
|
-
, h_connection_close
|
343
|
-
};
|
344
|
-
|
345
|
-
enum http_host_state
|
346
|
-
{
|
347
|
-
s_http_host_dead = 1
|
348
|
-
, s_http_userinfo_start
|
349
|
-
, s_http_userinfo
|
350
|
-
, s_http_host_start
|
351
|
-
, s_http_host_v6_start
|
352
|
-
, s_http_host
|
353
|
-
, s_http_host_v6
|
354
|
-
, s_http_host_v6_end
|
355
|
-
, s_http_host_port_start
|
356
|
-
, s_http_host_port
|
357
|
-
};
|
358
|
-
|
359
|
-
/* Macros for character classes; depends on strict-mode */
|
360
|
-
#define CR '\r'
|
361
|
-
#define LF '\n'
|
362
|
-
#define LOWER(c) (unsigned char)(c | 0x20)
|
363
|
-
#define IS_ALPHA(c) (LOWER(c) >= 'a' && LOWER(c) <= 'z')
|
364
|
-
#define IS_NUM(c) ((c) >= '0' && (c) <= '9')
|
365
|
-
#define IS_ALPHANUM(c) (IS_ALPHA(c) || IS_NUM(c))
|
366
|
-
#define IS_HEX(c) (IS_NUM(c) || (LOWER(c) >= 'a' && LOWER(c) <= 'f'))
|
367
|
-
#define IS_MARK(c) ((c) == '-' || (c) == '_' || (c) == '.' || \
|
368
|
-
(c) == '!' || (c) == '~' || (c) == '*' || (c) == '\'' || (c) == '(' || \
|
369
|
-
(c) == ')')
|
370
|
-
#define IS_USERINFO_CHAR(c) (IS_ALPHANUM(c) || IS_MARK(c) || (c) == '%' || \
|
371
|
-
(c) == ';' || (c) == ':' || (c) == '&' || (c) == '=' || (c) == '+' || \
|
372
|
-
(c) == '$' || (c) == ',')
|
373
|
-
|
374
|
-
#if HTTP_PARSER_STRICT
|
375
|
-
#define TOKEN(c) (tokens[(unsigned char)c])
|
376
|
-
#define IS_URL_CHAR(c) (BIT_AT(normal_url_char, (unsigned char)c))
|
377
|
-
#define IS_HOST_CHAR(c) (IS_ALPHANUM(c) || (c) == '.' || (c) == '-')
|
378
|
-
#else
|
379
|
-
#define TOKEN(c) ((c == ' ') ? ' ' : tokens[(unsigned char)c])
|
380
|
-
#define IS_URL_CHAR(c) \
|
381
|
-
(BIT_AT(normal_url_char, (unsigned char)c) || ((c) & 0x80))
|
382
|
-
#define IS_HOST_CHAR(c) \
|
383
|
-
(IS_ALPHANUM(c) || (c) == '.' || (c) == '-' || (c) == '_')
|
384
|
-
#endif
|
385
|
-
|
386
|
-
|
387
|
-
#define start_state (parser->type == HTTP_REQUEST ? s_start_req : s_start_res)
|
388
|
-
|
389
|
-
|
390
|
-
#if HTTP_PARSER_STRICT
|
391
|
-
# define STRICT_CHECK(cond) \
|
392
|
-
do { \
|
393
|
-
if (cond) { \
|
394
|
-
SET_ERRNO(HPE_STRICT); \
|
395
|
-
goto error; \
|
396
|
-
} \
|
397
|
-
} while (0)
|
398
|
-
# define NEW_MESSAGE() (http_should_keep_alive(parser) ? start_state : s_dead)
|
399
|
-
#else
|
400
|
-
# define STRICT_CHECK(cond)
|
401
|
-
# define NEW_MESSAGE() start_state
|
402
|
-
#endif
|
403
|
-
|
404
|
-
|
405
|
-
/* Map errno values to strings for human-readable output */
|
406
|
-
#define HTTP_STRERROR_GEN(n, s) { "HPE_" #n, s },
|
407
|
-
static struct {
|
408
|
-
const char *name;
|
409
|
-
const char *description;
|
410
|
-
} http_strerror_tab[] = {
|
411
|
-
HTTP_ERRNO_MAP(HTTP_STRERROR_GEN)
|
412
|
-
};
|
413
|
-
#undef HTTP_STRERROR_GEN
|
414
|
-
|
415
|
-
int http_message_needs_eof(const http_parser *parser);
|
416
|
-
|
417
|
-
/* Our URL parser.
|
418
|
-
*
|
419
|
-
* This is designed to be shared by http_parser_execute() for URL validation,
|
420
|
-
* hence it has a state transition + byte-for-byte interface. In addition, it
|
421
|
-
* is meant to be embedded in http_parser_parse_url(), which does the dirty
|
422
|
-
* work of turning state transitions URL components for its API.
|
423
|
-
*
|
424
|
-
* This function should only be invoked with non-space characters. It is
|
425
|
-
* assumed that the caller cares about (and can detect) the transition between
|
426
|
-
* URL and non-URL states by looking for these.
|
427
|
-
*/
|
428
|
-
static enum state
|
429
|
-
parse_url_char(enum state s, const char ch)
|
430
|
-
{
|
431
|
-
if (ch == ' ' || ch == '\r' || ch == '\n') {
|
432
|
-
return s_dead;
|
433
|
-
}
|
434
|
-
|
435
|
-
#if HTTP_PARSER_STRICT
|
436
|
-
if (ch == '\t' || ch == '\f') {
|
437
|
-
return s_dead;
|
438
|
-
}
|
439
|
-
#endif
|
440
|
-
|
441
|
-
switch (s) {
|
442
|
-
case s_req_spaces_before_url:
|
443
|
-
/* Proxied requests are followed by scheme of an absolute URI (alpha).
|
444
|
-
* All methods except CONNECT are followed by '/' or '*'.
|
445
|
-
*/
|
446
|
-
|
447
|
-
if (ch == '/' || ch == '*') {
|
448
|
-
return s_req_path;
|
449
|
-
}
|
450
|
-
|
451
|
-
if (IS_ALPHA(ch)) {
|
452
|
-
return s_req_schema;
|
453
|
-
}
|
454
|
-
|
455
|
-
break;
|
456
|
-
|
457
|
-
case s_req_schema:
|
458
|
-
if (IS_ALPHA(ch)) {
|
459
|
-
return s;
|
460
|
-
}
|
461
|
-
|
462
|
-
if (ch == ':') {
|
463
|
-
return s_req_schema_slash;
|
464
|
-
}
|
465
|
-
|
466
|
-
break;
|
467
|
-
|
468
|
-
case s_req_schema_slash:
|
469
|
-
if (ch == '/') {
|
470
|
-
return s_req_schema_slash_slash;
|
471
|
-
}
|
472
|
-
|
473
|
-
break;
|
474
|
-
|
475
|
-
case s_req_schema_slash_slash:
|
476
|
-
if (ch == '/') {
|
477
|
-
return s_req_server_start;
|
478
|
-
}
|
479
|
-
|
480
|
-
break;
|
481
|
-
|
482
|
-
case s_req_server_with_at:
|
483
|
-
if (ch == '@') {
|
484
|
-
return s_dead;
|
485
|
-
}
|
486
|
-
|
487
|
-
/* FALLTHROUGH */
|
488
|
-
case s_req_server_start:
|
489
|
-
case s_req_server:
|
490
|
-
if (ch == '/') {
|
491
|
-
return s_req_path;
|
492
|
-
}
|
493
|
-
|
494
|
-
if (ch == '?') {
|
495
|
-
return s_req_query_string_start;
|
496
|
-
}
|
497
|
-
|
498
|
-
if (ch == '@') {
|
499
|
-
return s_req_server_with_at;
|
500
|
-
}
|
501
|
-
|
502
|
-
if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
|
503
|
-
return s_req_server;
|
504
|
-
}
|
505
|
-
|
506
|
-
break;
|
507
|
-
|
508
|
-
case s_req_path:
|
509
|
-
if (IS_URL_CHAR(ch)) {
|
510
|
-
return s;
|
511
|
-
}
|
512
|
-
|
513
|
-
switch (ch) {
|
514
|
-
case '?':
|
515
|
-
return s_req_query_string_start;
|
516
|
-
|
517
|
-
case '#':
|
518
|
-
return s_req_fragment_start;
|
519
|
-
}
|
520
|
-
|
521
|
-
break;
|
522
|
-
|
523
|
-
case s_req_query_string_start:
|
524
|
-
case s_req_query_string:
|
525
|
-
if (IS_URL_CHAR(ch)) {
|
526
|
-
return s_req_query_string;
|
527
|
-
}
|
528
|
-
|
529
|
-
switch (ch) {
|
530
|
-
case '?':
|
531
|
-
/* allow extra '?' in query string */
|
532
|
-
return s_req_query_string;
|
533
|
-
|
534
|
-
case '#':
|
535
|
-
return s_req_fragment_start;
|
536
|
-
}
|
537
|
-
|
538
|
-
break;
|
539
|
-
|
540
|
-
case s_req_fragment_start:
|
541
|
-
if (IS_URL_CHAR(ch)) {
|
542
|
-
return s_req_fragment;
|
543
|
-
}
|
544
|
-
|
545
|
-
switch (ch) {
|
546
|
-
case '?':
|
547
|
-
return s_req_fragment;
|
548
|
-
|
549
|
-
case '#':
|
550
|
-
return s;
|
551
|
-
}
|
552
|
-
|
553
|
-
break;
|
554
|
-
|
555
|
-
case s_req_fragment:
|
556
|
-
if (IS_URL_CHAR(ch)) {
|
557
|
-
return s;
|
558
|
-
}
|
559
|
-
|
560
|
-
switch (ch) {
|
561
|
-
case '?':
|
562
|
-
case '#':
|
563
|
-
return s;
|
564
|
-
}
|
565
|
-
|
566
|
-
break;
|
567
|
-
|
568
|
-
default:
|
569
|
-
break;
|
570
|
-
}
|
571
|
-
|
572
|
-
/* We should never fall out of the switch above unless there's an error */
|
573
|
-
return s_dead;
|
574
|
-
}
|
575
|
-
|
576
|
-
size_t http_parser_execute (http_parser *parser,
|
577
|
-
const http_parser_settings *settings,
|
578
|
-
const char *data,
|
579
|
-
size_t len)
|
580
|
-
{
|
581
|
-
char c, ch;
|
582
|
-
int8_t unhex_val;
|
583
|
-
const char *p = data;
|
584
|
-
const char *header_field_mark = 0;
|
585
|
-
const char *header_value_mark = 0;
|
586
|
-
const char *url_mark = 0;
|
587
|
-
const char *body_mark = 0;
|
588
|
-
const char *status_mark = 0;
|
589
|
-
|
590
|
-
/* We're in an error state. Don't bother doing anything. */
|
591
|
-
if (HTTP_PARSER_ERRNO(parser) != HPE_OK) {
|
592
|
-
return 0;
|
593
|
-
}
|
594
|
-
|
595
|
-
if (len == 0) {
|
596
|
-
switch (parser->state) {
|
597
|
-
case s_body_identity_eof:
|
598
|
-
/* Use of CALLBACK_NOTIFY() here would erroneously return 1 byte read if
|
599
|
-
* we got paused.
|
600
|
-
*/
|
601
|
-
CALLBACK_NOTIFY_NOADVANCE(message_complete);
|
602
|
-
return 0;
|
603
|
-
|
604
|
-
case s_dead:
|
605
|
-
case s_start_req_or_res:
|
606
|
-
case s_start_res:
|
607
|
-
case s_start_req:
|
608
|
-
return 0;
|
609
|
-
|
610
|
-
default:
|
611
|
-
SET_ERRNO(HPE_INVALID_EOF_STATE);
|
612
|
-
return 1;
|
613
|
-
}
|
614
|
-
}
|
615
|
-
|
616
|
-
|
617
|
-
if (parser->state == s_header_field)
|
618
|
-
header_field_mark = data;
|
619
|
-
if (parser->state == s_header_value)
|
620
|
-
header_value_mark = data;
|
621
|
-
switch (parser->state) {
|
622
|
-
case s_req_path:
|
623
|
-
case s_req_schema:
|
624
|
-
case s_req_schema_slash:
|
625
|
-
case s_req_schema_slash_slash:
|
626
|
-
case s_req_server_start:
|
627
|
-
case s_req_server:
|
628
|
-
case s_req_server_with_at:
|
629
|
-
case s_req_query_string_start:
|
630
|
-
case s_req_query_string:
|
631
|
-
case s_req_fragment_start:
|
632
|
-
case s_req_fragment:
|
633
|
-
url_mark = data;
|
634
|
-
break;
|
635
|
-
case s_res_status:
|
636
|
-
status_mark = data;
|
637
|
-
break;
|
638
|
-
}
|
639
|
-
|
640
|
-
for (p=data; p != data + len; p++) {
|
641
|
-
ch = *p;
|
642
|
-
|
643
|
-
if (PARSING_HEADER(parser->state)) {
|
644
|
-
++parser->nread;
|
645
|
-
/* Don't allow the total size of the HTTP headers (including the status
|
646
|
-
* line) to exceed HTTP_MAX_HEADER_SIZE. This check is here to protect
|
647
|
-
* embedders against denial-of-service attacks where the attacker feeds
|
648
|
-
* us a never-ending header that the embedder keeps buffering.
|
649
|
-
*
|
650
|
-
* This check is arguably the responsibility of embedders but we're doing
|
651
|
-
* it on the embedder's behalf because most won't bother and this way we
|
652
|
-
* make the web a little safer. HTTP_MAX_HEADER_SIZE is still far bigger
|
653
|
-
* than any reasonable request or response so this should never affect
|
654
|
-
* day-to-day operation.
|
655
|
-
*/
|
656
|
-
if (parser->nread > (HTTP_MAX_HEADER_SIZE)) {
|
657
|
-
SET_ERRNO(HPE_HEADER_OVERFLOW);
|
658
|
-
goto error;
|
659
|
-
}
|
660
|
-
}
|
661
|
-
|
662
|
-
reexecute_byte:
|
663
|
-
switch (parser->state) {
|
664
|
-
|
665
|
-
case s_dead:
|
666
|
-
/* this state is used after a 'Connection: close' message
|
667
|
-
* the parser will error out if it reads another message
|
668
|
-
*/
|
669
|
-
if (ch == CR || ch == LF)
|
670
|
-
break;
|
671
|
-
|
672
|
-
SET_ERRNO(HPE_CLOSED_CONNECTION);
|
673
|
-
goto error;
|
674
|
-
|
675
|
-
case s_start_req_or_res:
|
676
|
-
{
|
677
|
-
if (ch == CR || ch == LF)
|
678
|
-
break;
|
679
|
-
parser->flags = 0;
|
680
|
-
parser->content_length = ULLONG_MAX;
|
681
|
-
|
682
|
-
if (ch == 'H') {
|
683
|
-
parser->state = s_res_or_resp_H;
|
684
|
-
|
685
|
-
CALLBACK_NOTIFY(message_begin);
|
686
|
-
} else {
|
687
|
-
parser->type = HTTP_REQUEST;
|
688
|
-
parser->state = s_start_req;
|
689
|
-
goto reexecute_byte;
|
690
|
-
}
|
691
|
-
|
692
|
-
break;
|
693
|
-
}
|
694
|
-
|
695
|
-
case s_res_or_resp_H:
|
696
|
-
if (ch == 'T') {
|
697
|
-
parser->type = HTTP_RESPONSE;
|
698
|
-
parser->state = s_res_HT;
|
699
|
-
} else {
|
700
|
-
if (ch != 'E') {
|
701
|
-
SET_ERRNO(HPE_INVALID_CONSTANT);
|
702
|
-
goto error;
|
703
|
-
}
|
704
|
-
|
705
|
-
parser->type = HTTP_REQUEST;
|
706
|
-
parser->method = HTTP_HEAD;
|
707
|
-
parser->index = 2;
|
708
|
-
parser->state = s_req_method;
|
709
|
-
}
|
710
|
-
break;
|
711
|
-
|
712
|
-
case s_start_res:
|
713
|
-
{
|
714
|
-
parser->flags = 0;
|
715
|
-
parser->content_length = ULLONG_MAX;
|
716
|
-
|
717
|
-
switch (ch) {
|
718
|
-
case 'H':
|
719
|
-
parser->state = s_res_H;
|
720
|
-
break;
|
721
|
-
|
722
|
-
case CR:
|
723
|
-
case LF:
|
724
|
-
break;
|
725
|
-
|
726
|
-
default:
|
727
|
-
SET_ERRNO(HPE_INVALID_CONSTANT);
|
728
|
-
goto error;
|
729
|
-
}
|
730
|
-
|
731
|
-
CALLBACK_NOTIFY(message_begin);
|
732
|
-
break;
|
733
|
-
}
|
734
|
-
|
735
|
-
case s_res_H:
|
736
|
-
STRICT_CHECK(ch != 'T');
|
737
|
-
parser->state = s_res_HT;
|
738
|
-
break;
|
739
|
-
|
740
|
-
case s_res_HT:
|
741
|
-
STRICT_CHECK(ch != 'T');
|
742
|
-
parser->state = s_res_HTT;
|
743
|
-
break;
|
744
|
-
|
745
|
-
case s_res_HTT:
|
746
|
-
STRICT_CHECK(ch != 'P');
|
747
|
-
parser->state = s_res_HTTP;
|
748
|
-
break;
|
749
|
-
|
750
|
-
case s_res_HTTP:
|
751
|
-
STRICT_CHECK(ch != '/');
|
752
|
-
parser->state = s_res_first_http_major;
|
753
|
-
break;
|
754
|
-
|
755
|
-
case s_res_first_http_major:
|
756
|
-
if (ch < '0' || ch > '9') {
|
757
|
-
SET_ERRNO(HPE_INVALID_VERSION);
|
758
|
-
goto error;
|
759
|
-
}
|
760
|
-
|
761
|
-
parser->http_major = ch - '0';
|
762
|
-
parser->state = s_res_http_major;
|
763
|
-
break;
|
764
|
-
|
765
|
-
/* major HTTP version or dot */
|
766
|
-
case s_res_http_major:
|
767
|
-
{
|
768
|
-
if (ch == '.') {
|
769
|
-
parser->state = s_res_first_http_minor;
|
770
|
-
break;
|
771
|
-
}
|
772
|
-
|
773
|
-
if (!IS_NUM(ch)) {
|
774
|
-
SET_ERRNO(HPE_INVALID_VERSION);
|
775
|
-
goto error;
|
776
|
-
}
|
777
|
-
|
778
|
-
parser->http_major *= 10;
|
779
|
-
parser->http_major += ch - '0';
|
780
|
-
|
781
|
-
if (parser->http_major > 999) {
|
782
|
-
SET_ERRNO(HPE_INVALID_VERSION);
|
783
|
-
goto error;
|
784
|
-
}
|
785
|
-
|
786
|
-
break;
|
787
|
-
}
|
788
|
-
|
789
|
-
/* first digit of minor HTTP version */
|
790
|
-
case s_res_first_http_minor:
|
791
|
-
if (!IS_NUM(ch)) {
|
792
|
-
SET_ERRNO(HPE_INVALID_VERSION);
|
793
|
-
goto error;
|
794
|
-
}
|
795
|
-
|
796
|
-
parser->http_minor = ch - '0';
|
797
|
-
parser->state = s_res_http_minor;
|
798
|
-
break;
|
799
|
-
|
800
|
-
/* minor HTTP version or end of request line */
|
801
|
-
case s_res_http_minor:
|
802
|
-
{
|
803
|
-
if (ch == ' ') {
|
804
|
-
parser->state = s_res_first_status_code;
|
805
|
-
break;
|
806
|
-
}
|
807
|
-
|
808
|
-
if (!IS_NUM(ch)) {
|
809
|
-
SET_ERRNO(HPE_INVALID_VERSION);
|
810
|
-
goto error;
|
811
|
-
}
|
812
|
-
|
813
|
-
parser->http_minor *= 10;
|
814
|
-
parser->http_minor += ch - '0';
|
815
|
-
|
816
|
-
if (parser->http_minor > 999) {
|
817
|
-
SET_ERRNO(HPE_INVALID_VERSION);
|
818
|
-
goto error;
|
819
|
-
}
|
820
|
-
|
821
|
-
break;
|
822
|
-
}
|
823
|
-
|
824
|
-
case s_res_first_status_code:
|
825
|
-
{
|
826
|
-
if (!IS_NUM(ch)) {
|
827
|
-
if (ch == ' ') {
|
828
|
-
break;
|
829
|
-
}
|
830
|
-
|
831
|
-
SET_ERRNO(HPE_INVALID_STATUS);
|
832
|
-
goto error;
|
833
|
-
}
|
834
|
-
parser->status_code = ch - '0';
|
835
|
-
parser->state = s_res_status_code;
|
836
|
-
break;
|
837
|
-
}
|
838
|
-
|
839
|
-
case s_res_status_code:
|
840
|
-
{
|
841
|
-
if (!IS_NUM(ch)) {
|
842
|
-
switch (ch) {
|
843
|
-
case ' ':
|
844
|
-
parser->state = s_res_status_start;
|
845
|
-
break;
|
846
|
-
case CR:
|
847
|
-
parser->state = s_res_line_almost_done;
|
848
|
-
break;
|
849
|
-
case LF:
|
850
|
-
parser->state = s_header_field_start;
|
851
|
-
break;
|
852
|
-
default:
|
853
|
-
SET_ERRNO(HPE_INVALID_STATUS);
|
854
|
-
goto error;
|
855
|
-
}
|
856
|
-
break;
|
857
|
-
}
|
858
|
-
|
859
|
-
parser->status_code *= 10;
|
860
|
-
parser->status_code += ch - '0';
|
861
|
-
|
862
|
-
if (parser->status_code > 999) {
|
863
|
-
SET_ERRNO(HPE_INVALID_STATUS);
|
864
|
-
goto error;
|
865
|
-
}
|
866
|
-
|
867
|
-
break;
|
868
|
-
}
|
869
|
-
|
870
|
-
case s_res_status_start:
|
871
|
-
{
|
872
|
-
if (ch == CR) {
|
873
|
-
parser->state = s_res_line_almost_done;
|
874
|
-
break;
|
875
|
-
}
|
876
|
-
|
877
|
-
if (ch == LF) {
|
878
|
-
parser->state = s_header_field_start;
|
879
|
-
break;
|
880
|
-
}
|
881
|
-
|
882
|
-
MARK(status);
|
883
|
-
parser->state = s_res_status;
|
884
|
-
parser->index = 0;
|
885
|
-
break;
|
886
|
-
}
|
887
|
-
|
888
|
-
case s_res_status:
|
889
|
-
if (ch == CR) {
|
890
|
-
parser->state = s_res_line_almost_done;
|
891
|
-
CALLBACK_DATA(status);
|
892
|
-
break;
|
893
|
-
}
|
894
|
-
|
895
|
-
if (ch == LF) {
|
896
|
-
parser->state = s_header_field_start;
|
897
|
-
CALLBACK_DATA(status);
|
898
|
-
break;
|
899
|
-
}
|
900
|
-
|
901
|
-
break;
|
902
|
-
|
903
|
-
case s_res_line_almost_done:
|
904
|
-
STRICT_CHECK(ch != LF);
|
905
|
-
parser->state = s_header_field_start;
|
906
|
-
break;
|
907
|
-
|
908
|
-
case s_start_req:
|
909
|
-
{
|
910
|
-
if (ch == CR || ch == LF)
|
911
|
-
break;
|
912
|
-
parser->flags = 0;
|
913
|
-
parser->content_length = ULLONG_MAX;
|
914
|
-
|
915
|
-
if (!IS_ALPHA(ch)) {
|
916
|
-
SET_ERRNO(HPE_INVALID_METHOD);
|
917
|
-
goto error;
|
918
|
-
}
|
919
|
-
|
920
|
-
parser->method = (enum http_method) 0;
|
921
|
-
parser->index = 1;
|
922
|
-
switch (ch) {
|
923
|
-
case 'C': parser->method = HTTP_CONNECT; /* or COPY, CHECKOUT */ break;
|
924
|
-
case 'D': parser->method = HTTP_DELETE; break;
|
925
|
-
case 'G': parser->method = HTTP_GET; break;
|
926
|
-
case 'H': parser->method = HTTP_HEAD; break;
|
927
|
-
case 'L': parser->method = HTTP_LOCK; break;
|
928
|
-
case 'M': parser->method = HTTP_MKCOL; /* or MOVE, MKACTIVITY, MERGE, M-SEARCH, MKCALENDAR */ break;
|
929
|
-
case 'N': parser->method = HTTP_NOTIFY; break;
|
930
|
-
case 'O': parser->method = HTTP_OPTIONS; break;
|
931
|
-
case 'P': parser->method = HTTP_POST;
|
932
|
-
/* or PROPFIND|PROPPATCH|PUT|PATCH|PURGE */
|
933
|
-
break;
|
934
|
-
case 'R': parser->method = HTTP_REPORT; break;
|
935
|
-
case 'S': parser->method = HTTP_SUBSCRIBE; /* or SEARCH */ break;
|
936
|
-
case 'T': parser->method = HTTP_TRACE; break;
|
937
|
-
case 'U': parser->method = HTTP_UNLOCK; /* or UNSUBSCRIBE */ break;
|
938
|
-
default:
|
939
|
-
SET_ERRNO(HPE_INVALID_METHOD);
|
940
|
-
goto error;
|
941
|
-
}
|
942
|
-
parser->state = s_req_method;
|
943
|
-
|
944
|
-
CALLBACK_NOTIFY(message_begin);
|
945
|
-
|
946
|
-
break;
|
947
|
-
}
|
948
|
-
|
949
|
-
case s_req_method:
|
950
|
-
{
|
951
|
-
const char *matcher;
|
952
|
-
if (ch == '\0') {
|
953
|
-
SET_ERRNO(HPE_INVALID_METHOD);
|
954
|
-
goto error;
|
955
|
-
}
|
956
|
-
|
957
|
-
matcher = method_strings[parser->method];
|
958
|
-
if (ch == ' ' && matcher[parser->index] == '\0') {
|
959
|
-
parser->state = s_req_spaces_before_url;
|
960
|
-
} else if (ch == matcher[parser->index]) {
|
961
|
-
; /* nada */
|
962
|
-
} else if (parser->method == HTTP_CONNECT) {
|
963
|
-
if (parser->index == 1 && ch == 'H') {
|
964
|
-
parser->method = HTTP_CHECKOUT;
|
965
|
-
} else if (parser->index == 2 && ch == 'P') {
|
966
|
-
parser->method = HTTP_COPY;
|
967
|
-
} else {
|
968
|
-
SET_ERRNO(HPE_INVALID_METHOD);
|
969
|
-
goto error;
|
970
|
-
}
|
971
|
-
} else if (parser->method == HTTP_MKCOL) {
|
972
|
-
if (parser->index == 1 && ch == 'O') {
|
973
|
-
parser->method = HTTP_MOVE;
|
974
|
-
} else if (parser->index == 1 && ch == 'E') {
|
975
|
-
parser->method = HTTP_MERGE;
|
976
|
-
} else if (parser->index == 1 && ch == '-') {
|
977
|
-
parser->method = HTTP_MSEARCH;
|
978
|
-
} else if (parser->index == 2 && ch == 'A') {
|
979
|
-
parser->method = HTTP_MKACTIVITY;
|
980
|
-
} else if (parser->index == 3 && ch == 'A') {
|
981
|
-
parser->method = HTTP_MKCALENDAR;
|
982
|
-
} else {
|
983
|
-
SET_ERRNO(HPE_INVALID_METHOD);
|
984
|
-
goto error;
|
985
|
-
}
|
986
|
-
} else if (parser->method == HTTP_SUBSCRIBE) {
|
987
|
-
if (parser->index == 1 && ch == 'E') {
|
988
|
-
parser->method = HTTP_SEARCH;
|
989
|
-
} else {
|
990
|
-
SET_ERRNO(HPE_INVALID_METHOD);
|
991
|
-
goto error;
|
992
|
-
}
|
993
|
-
} else if (parser->index == 1 && parser->method == HTTP_POST) {
|
994
|
-
if (ch == 'R') {
|
995
|
-
parser->method = HTTP_PROPFIND; /* or HTTP_PROPPATCH */
|
996
|
-
} else if (ch == 'U') {
|
997
|
-
parser->method = HTTP_PUT; /* or HTTP_PURGE */
|
998
|
-
} else if (ch == 'A') {
|
999
|
-
parser->method = HTTP_PATCH;
|
1000
|
-
} else {
|
1001
|
-
SET_ERRNO(HPE_INVALID_METHOD);
|
1002
|
-
goto error;
|
1003
|
-
}
|
1004
|
-
} else if (parser->index == 2) {
|
1005
|
-
if (parser->method == HTTP_PUT) {
|
1006
|
-
if (ch == 'R') {
|
1007
|
-
parser->method = HTTP_PURGE;
|
1008
|
-
} else {
|
1009
|
-
SET_ERRNO(HPE_INVALID_METHOD);
|
1010
|
-
goto error;
|
1011
|
-
}
|
1012
|
-
} else if (parser->method == HTTP_UNLOCK) {
|
1013
|
-
if (ch == 'S') {
|
1014
|
-
parser->method = HTTP_UNSUBSCRIBE;
|
1015
|
-
} else {
|
1016
|
-
SET_ERRNO(HPE_INVALID_METHOD);
|
1017
|
-
goto error;
|
1018
|
-
}
|
1019
|
-
} else {
|
1020
|
-
SET_ERRNO(HPE_INVALID_METHOD);
|
1021
|
-
goto error;
|
1022
|
-
}
|
1023
|
-
} else if (parser->index == 4 && parser->method == HTTP_PROPFIND && ch == 'P') {
|
1024
|
-
parser->method = HTTP_PROPPATCH;
|
1025
|
-
} else {
|
1026
|
-
SET_ERRNO(HPE_INVALID_METHOD);
|
1027
|
-
goto error;
|
1028
|
-
}
|
1029
|
-
|
1030
|
-
++parser->index;
|
1031
|
-
break;
|
1032
|
-
}
|
1033
|
-
|
1034
|
-
case s_req_spaces_before_url:
|
1035
|
-
{
|
1036
|
-
if (ch == ' ') break;
|
1037
|
-
|
1038
|
-
MARK(url);
|
1039
|
-
if (parser->method == HTTP_CONNECT) {
|
1040
|
-
parser->state = s_req_server_start;
|
1041
|
-
}
|
1042
|
-
|
1043
|
-
parser->state = parse_url_char((enum state)parser->state, ch);
|
1044
|
-
if (parser->state == s_dead) {
|
1045
|
-
SET_ERRNO(HPE_INVALID_URL);
|
1046
|
-
goto error;
|
1047
|
-
}
|
1048
|
-
|
1049
|
-
break;
|
1050
|
-
}
|
1051
|
-
|
1052
|
-
case s_req_schema:
|
1053
|
-
case s_req_schema_slash:
|
1054
|
-
case s_req_schema_slash_slash:
|
1055
|
-
case s_req_server_start:
|
1056
|
-
{
|
1057
|
-
switch (ch) {
|
1058
|
-
/* No whitespace allowed here */
|
1059
|
-
case ' ':
|
1060
|
-
case CR:
|
1061
|
-
case LF:
|
1062
|
-
SET_ERRNO(HPE_INVALID_URL);
|
1063
|
-
goto error;
|
1064
|
-
default:
|
1065
|
-
parser->state = parse_url_char((enum state)parser->state, ch);
|
1066
|
-
if (parser->state == s_dead) {
|
1067
|
-
SET_ERRNO(HPE_INVALID_URL);
|
1068
|
-
goto error;
|
1069
|
-
}
|
1070
|
-
}
|
1071
|
-
|
1072
|
-
break;
|
1073
|
-
}
|
1074
|
-
|
1075
|
-
case s_req_server:
|
1076
|
-
case s_req_server_with_at:
|
1077
|
-
case s_req_path:
|
1078
|
-
case s_req_query_string_start:
|
1079
|
-
case s_req_query_string:
|
1080
|
-
case s_req_fragment_start:
|
1081
|
-
case s_req_fragment:
|
1082
|
-
{
|
1083
|
-
switch (ch) {
|
1084
|
-
case ' ':
|
1085
|
-
parser->state = s_req_http_start;
|
1086
|
-
CALLBACK_DATA(url);
|
1087
|
-
break;
|
1088
|
-
case CR:
|
1089
|
-
case LF:
|
1090
|
-
parser->http_major = 0;
|
1091
|
-
parser->http_minor = 9;
|
1092
|
-
parser->state = (ch == CR) ?
|
1093
|
-
s_req_line_almost_done :
|
1094
|
-
s_header_field_start;
|
1095
|
-
CALLBACK_DATA(url);
|
1096
|
-
break;
|
1097
|
-
default:
|
1098
|
-
parser->state = parse_url_char((enum state)parser->state, ch);
|
1099
|
-
if (parser->state == s_dead) {
|
1100
|
-
SET_ERRNO(HPE_INVALID_URL);
|
1101
|
-
goto error;
|
1102
|
-
}
|
1103
|
-
}
|
1104
|
-
break;
|
1105
|
-
}
|
1106
|
-
|
1107
|
-
case s_req_http_start:
|
1108
|
-
switch (ch) {
|
1109
|
-
case 'H':
|
1110
|
-
parser->state = s_req_http_H;
|
1111
|
-
break;
|
1112
|
-
case ' ':
|
1113
|
-
break;
|
1114
|
-
default:
|
1115
|
-
SET_ERRNO(HPE_INVALID_CONSTANT);
|
1116
|
-
goto error;
|
1117
|
-
}
|
1118
|
-
break;
|
1119
|
-
|
1120
|
-
case s_req_http_H:
|
1121
|
-
STRICT_CHECK(ch != 'T');
|
1122
|
-
parser->state = s_req_http_HT;
|
1123
|
-
break;
|
1124
|
-
|
1125
|
-
case s_req_http_HT:
|
1126
|
-
STRICT_CHECK(ch != 'T');
|
1127
|
-
parser->state = s_req_http_HTT;
|
1128
|
-
break;
|
1129
|
-
|
1130
|
-
case s_req_http_HTT:
|
1131
|
-
STRICT_CHECK(ch != 'P');
|
1132
|
-
parser->state = s_req_http_HTTP;
|
1133
|
-
break;
|
1134
|
-
|
1135
|
-
case s_req_http_HTTP:
|
1136
|
-
STRICT_CHECK(ch != '/');
|
1137
|
-
parser->state = s_req_first_http_major;
|
1138
|
-
break;
|
1139
|
-
|
1140
|
-
/* first digit of major HTTP version */
|
1141
|
-
case s_req_first_http_major:
|
1142
|
-
if (ch < '1' || ch > '9') {
|
1143
|
-
SET_ERRNO(HPE_INVALID_VERSION);
|
1144
|
-
goto error;
|
1145
|
-
}
|
1146
|
-
|
1147
|
-
parser->http_major = ch - '0';
|
1148
|
-
parser->state = s_req_http_major;
|
1149
|
-
break;
|
1150
|
-
|
1151
|
-
/* major HTTP version or dot */
|
1152
|
-
case s_req_http_major:
|
1153
|
-
{
|
1154
|
-
if (ch == '.') {
|
1155
|
-
parser->state = s_req_first_http_minor;
|
1156
|
-
break;
|
1157
|
-
}
|
1158
|
-
|
1159
|
-
if (!IS_NUM(ch)) {
|
1160
|
-
SET_ERRNO(HPE_INVALID_VERSION);
|
1161
|
-
goto error;
|
1162
|
-
}
|
1163
|
-
|
1164
|
-
parser->http_major *= 10;
|
1165
|
-
parser->http_major += ch - '0';
|
1166
|
-
|
1167
|
-
if (parser->http_major > 999) {
|
1168
|
-
SET_ERRNO(HPE_INVALID_VERSION);
|
1169
|
-
goto error;
|
1170
|
-
}
|
1171
|
-
|
1172
|
-
break;
|
1173
|
-
}
|
1174
|
-
|
1175
|
-
/* first digit of minor HTTP version */
|
1176
|
-
case s_req_first_http_minor:
|
1177
|
-
if (!IS_NUM(ch)) {
|
1178
|
-
SET_ERRNO(HPE_INVALID_VERSION);
|
1179
|
-
goto error;
|
1180
|
-
}
|
1181
|
-
|
1182
|
-
parser->http_minor = ch - '0';
|
1183
|
-
parser->state = s_req_http_minor;
|
1184
|
-
break;
|
1185
|
-
|
1186
|
-
/* minor HTTP version or end of request line */
|
1187
|
-
case s_req_http_minor:
|
1188
|
-
{
|
1189
|
-
if (ch == CR) {
|
1190
|
-
parser->state = s_req_line_almost_done;
|
1191
|
-
break;
|
1192
|
-
}
|
1193
|
-
|
1194
|
-
if (ch == LF) {
|
1195
|
-
parser->state = s_header_field_start;
|
1196
|
-
break;
|
1197
|
-
}
|
1198
|
-
|
1199
|
-
/* XXX allow spaces after digit? */
|
1200
|
-
|
1201
|
-
if (!IS_NUM(ch)) {
|
1202
|
-
SET_ERRNO(HPE_INVALID_VERSION);
|
1203
|
-
goto error;
|
1204
|
-
}
|
1205
|
-
|
1206
|
-
parser->http_minor *= 10;
|
1207
|
-
parser->http_minor += ch - '0';
|
1208
|
-
|
1209
|
-
if (parser->http_minor > 999) {
|
1210
|
-
SET_ERRNO(HPE_INVALID_VERSION);
|
1211
|
-
goto error;
|
1212
|
-
}
|
1213
|
-
|
1214
|
-
break;
|
1215
|
-
}
|
1216
|
-
|
1217
|
-
/* end of request line */
|
1218
|
-
case s_req_line_almost_done:
|
1219
|
-
{
|
1220
|
-
if (ch != LF) {
|
1221
|
-
SET_ERRNO(HPE_LF_EXPECTED);
|
1222
|
-
goto error;
|
1223
|
-
}
|
1224
|
-
|
1225
|
-
parser->state = s_header_field_start;
|
1226
|
-
break;
|
1227
|
-
}
|
1228
|
-
|
1229
|
-
case s_header_field_start:
|
1230
|
-
{
|
1231
|
-
if (ch == CR) {
|
1232
|
-
parser->state = s_headers_almost_done;
|
1233
|
-
break;
|
1234
|
-
}
|
1235
|
-
|
1236
|
-
if (ch == LF) {
|
1237
|
-
/* they might be just sending \n instead of \r\n so this would be
|
1238
|
-
* the second \n to denote the end of headers*/
|
1239
|
-
parser->state = s_headers_almost_done;
|
1240
|
-
goto reexecute_byte;
|
1241
|
-
}
|
1242
|
-
|
1243
|
-
c = TOKEN(ch);
|
1244
|
-
|
1245
|
-
if (!c) {
|
1246
|
-
SET_ERRNO(HPE_INVALID_HEADER_TOKEN);
|
1247
|
-
goto error;
|
1248
|
-
}
|
1249
|
-
|
1250
|
-
MARK(header_field);
|
1251
|
-
|
1252
|
-
parser->index = 0;
|
1253
|
-
parser->state = s_header_field;
|
1254
|
-
|
1255
|
-
switch (c) {
|
1256
|
-
case 'c':
|
1257
|
-
parser->header_state = h_C;
|
1258
|
-
break;
|
1259
|
-
|
1260
|
-
case 'p':
|
1261
|
-
parser->header_state = h_matching_proxy_connection;
|
1262
|
-
break;
|
1263
|
-
|
1264
|
-
case 't':
|
1265
|
-
parser->header_state = h_matching_transfer_encoding;
|
1266
|
-
break;
|
1267
|
-
|
1268
|
-
case 'u':
|
1269
|
-
parser->header_state = h_matching_upgrade;
|
1270
|
-
break;
|
1271
|
-
|
1272
|
-
default:
|
1273
|
-
parser->header_state = h_general;
|
1274
|
-
break;
|
1275
|
-
}
|
1276
|
-
break;
|
1277
|
-
}
|
1278
|
-
|
1279
|
-
case s_header_field:
|
1280
|
-
{
|
1281
|
-
c = TOKEN(ch);
|
1282
|
-
|
1283
|
-
if (c) {
|
1284
|
-
switch (parser->header_state) {
|
1285
|
-
case h_general:
|
1286
|
-
break;
|
1287
|
-
|
1288
|
-
case h_C:
|
1289
|
-
parser->index++;
|
1290
|
-
parser->header_state = (c == 'o' ? h_CO : h_general);
|
1291
|
-
break;
|
1292
|
-
|
1293
|
-
case h_CO:
|
1294
|
-
parser->index++;
|
1295
|
-
parser->header_state = (c == 'n' ? h_CON : h_general);
|
1296
|
-
break;
|
1297
|
-
|
1298
|
-
case h_CON:
|
1299
|
-
parser->index++;
|
1300
|
-
switch (c) {
|
1301
|
-
case 'n':
|
1302
|
-
parser->header_state = h_matching_connection;
|
1303
|
-
break;
|
1304
|
-
case 't':
|
1305
|
-
parser->header_state = h_matching_content_length;
|
1306
|
-
break;
|
1307
|
-
default:
|
1308
|
-
parser->header_state = h_general;
|
1309
|
-
break;
|
1310
|
-
}
|
1311
|
-
break;
|
1312
|
-
|
1313
|
-
/* connection */
|
1314
|
-
|
1315
|
-
case h_matching_connection:
|
1316
|
-
parser->index++;
|
1317
|
-
if (parser->index > sizeof(CONNECTION)-1
|
1318
|
-
|| c != CONNECTION[parser->index]) {
|
1319
|
-
parser->header_state = h_general;
|
1320
|
-
} else if (parser->index == sizeof(CONNECTION)-2) {
|
1321
|
-
parser->header_state = h_connection;
|
1322
|
-
}
|
1323
|
-
break;
|
1324
|
-
|
1325
|
-
/* proxy-connection */
|
1326
|
-
|
1327
|
-
case h_matching_proxy_connection:
|
1328
|
-
parser->index++;
|
1329
|
-
if (parser->index > sizeof(PROXY_CONNECTION)-1
|
1330
|
-
|| c != PROXY_CONNECTION[parser->index]) {
|
1331
|
-
parser->header_state = h_general;
|
1332
|
-
} else if (parser->index == sizeof(PROXY_CONNECTION)-2) {
|
1333
|
-
parser->header_state = h_connection;
|
1334
|
-
}
|
1335
|
-
break;
|
1336
|
-
|
1337
|
-
/* content-length */
|
1338
|
-
|
1339
|
-
case h_matching_content_length:
|
1340
|
-
parser->index++;
|
1341
|
-
if (parser->index > sizeof(CONTENT_LENGTH)-1
|
1342
|
-
|| c != CONTENT_LENGTH[parser->index]) {
|
1343
|
-
parser->header_state = h_general;
|
1344
|
-
} else if (parser->index == sizeof(CONTENT_LENGTH)-2) {
|
1345
|
-
parser->header_state = h_content_length;
|
1346
|
-
}
|
1347
|
-
break;
|
1348
|
-
|
1349
|
-
/* transfer-encoding */
|
1350
|
-
|
1351
|
-
case h_matching_transfer_encoding:
|
1352
|
-
parser->index++;
|
1353
|
-
if (parser->index > sizeof(TRANSFER_ENCODING)-1
|
1354
|
-
|| c != TRANSFER_ENCODING[parser->index]) {
|
1355
|
-
parser->header_state = h_general;
|
1356
|
-
} else if (parser->index == sizeof(TRANSFER_ENCODING)-2) {
|
1357
|
-
parser->header_state = h_transfer_encoding;
|
1358
|
-
}
|
1359
|
-
break;
|
1360
|
-
|
1361
|
-
/* upgrade */
|
1362
|
-
|
1363
|
-
case h_matching_upgrade:
|
1364
|
-
parser->index++;
|
1365
|
-
if (parser->index > sizeof(UPGRADE)-1
|
1366
|
-
|| c != UPGRADE[parser->index]) {
|
1367
|
-
parser->header_state = h_general;
|
1368
|
-
} else if (parser->index == sizeof(UPGRADE)-2) {
|
1369
|
-
parser->header_state = h_upgrade;
|
1370
|
-
}
|
1371
|
-
break;
|
1372
|
-
|
1373
|
-
case h_connection:
|
1374
|
-
case h_content_length:
|
1375
|
-
case h_transfer_encoding:
|
1376
|
-
case h_upgrade:
|
1377
|
-
if (ch != ' ') parser->header_state = h_general;
|
1378
|
-
break;
|
1379
|
-
|
1380
|
-
default:
|
1381
|
-
assert(0 && "Unknown header_state");
|
1382
|
-
break;
|
1383
|
-
}
|
1384
|
-
break;
|
1385
|
-
}
|
1386
|
-
|
1387
|
-
if (ch == ':') {
|
1388
|
-
parser->state = s_header_value_discard_ws;
|
1389
|
-
CALLBACK_DATA(header_field);
|
1390
|
-
break;
|
1391
|
-
}
|
1392
|
-
|
1393
|
-
if (ch == CR) {
|
1394
|
-
parser->state = s_header_almost_done;
|
1395
|
-
CALLBACK_DATA(header_field);
|
1396
|
-
break;
|
1397
|
-
}
|
1398
|
-
|
1399
|
-
if (ch == LF) {
|
1400
|
-
parser->state = s_header_field_start;
|
1401
|
-
CALLBACK_DATA(header_field);
|
1402
|
-
break;
|
1403
|
-
}
|
1404
|
-
|
1405
|
-
SET_ERRNO(HPE_INVALID_HEADER_TOKEN);
|
1406
|
-
goto error;
|
1407
|
-
}
|
1408
|
-
|
1409
|
-
case s_header_value_discard_ws:
|
1410
|
-
if (ch == ' ' || ch == '\t') break;
|
1411
|
-
|
1412
|
-
if (ch == CR) {
|
1413
|
-
parser->state = s_header_value_discard_ws_almost_done;
|
1414
|
-
break;
|
1415
|
-
}
|
1416
|
-
|
1417
|
-
if (ch == LF) {
|
1418
|
-
parser->state = s_header_value_discard_lws;
|
1419
|
-
break;
|
1420
|
-
}
|
1421
|
-
|
1422
|
-
/* FALLTHROUGH */
|
1423
|
-
|
1424
|
-
case s_header_value_start:
|
1425
|
-
{
|
1426
|
-
MARK(header_value);
|
1427
|
-
|
1428
|
-
parser->state = s_header_value;
|
1429
|
-
parser->index = 0;
|
1430
|
-
|
1431
|
-
c = LOWER(ch);
|
1432
|
-
|
1433
|
-
switch (parser->header_state) {
|
1434
|
-
case h_upgrade:
|
1435
|
-
parser->flags |= F_UPGRADE;
|
1436
|
-
parser->header_state = h_general;
|
1437
|
-
break;
|
1438
|
-
|
1439
|
-
case h_transfer_encoding:
|
1440
|
-
/* looking for 'Transfer-Encoding: chunked' */
|
1441
|
-
if ('c' == c) {
|
1442
|
-
parser->header_state = h_matching_transfer_encoding_chunked;
|
1443
|
-
} else {
|
1444
|
-
parser->header_state = h_general;
|
1445
|
-
}
|
1446
|
-
break;
|
1447
|
-
|
1448
|
-
case h_content_length:
|
1449
|
-
if (!IS_NUM(ch)) {
|
1450
|
-
SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);
|
1451
|
-
goto error;
|
1452
|
-
}
|
1453
|
-
|
1454
|
-
parser->content_length = ch - '0';
|
1455
|
-
break;
|
1456
|
-
|
1457
|
-
case h_connection:
|
1458
|
-
/* looking for 'Connection: keep-alive' */
|
1459
|
-
if (c == 'k') {
|
1460
|
-
parser->header_state = h_matching_connection_keep_alive;
|
1461
|
-
/* looking for 'Connection: close' */
|
1462
|
-
} else if (c == 'c') {
|
1463
|
-
parser->header_state = h_matching_connection_close;
|
1464
|
-
} else {
|
1465
|
-
parser->header_state = h_general;
|
1466
|
-
}
|
1467
|
-
break;
|
1468
|
-
|
1469
|
-
default:
|
1470
|
-
parser->header_state = h_general;
|
1471
|
-
break;
|
1472
|
-
}
|
1473
|
-
break;
|
1474
|
-
}
|
1475
|
-
|
1476
|
-
case s_header_value:
|
1477
|
-
{
|
1478
|
-
|
1479
|
-
if (ch == CR) {
|
1480
|
-
parser->state = s_header_almost_done;
|
1481
|
-
CALLBACK_DATA(header_value);
|
1482
|
-
break;
|
1483
|
-
}
|
1484
|
-
|
1485
|
-
if (ch == LF) {
|
1486
|
-
parser->state = s_header_almost_done;
|
1487
|
-
CALLBACK_DATA_NOADVANCE(header_value);
|
1488
|
-
goto reexecute_byte;
|
1489
|
-
}
|
1490
|
-
|
1491
|
-
c = LOWER(ch);
|
1492
|
-
|
1493
|
-
switch (parser->header_state) {
|
1494
|
-
case h_general:
|
1495
|
-
break;
|
1496
|
-
|
1497
|
-
case h_connection:
|
1498
|
-
case h_transfer_encoding:
|
1499
|
-
assert(0 && "Shouldn't get here.");
|
1500
|
-
break;
|
1501
|
-
|
1502
|
-
case h_content_length:
|
1503
|
-
{
|
1504
|
-
boost::uint64_t t;
|
1505
|
-
|
1506
|
-
if (ch == ' ') break;
|
1507
|
-
|
1508
|
-
if (!IS_NUM(ch)) {
|
1509
|
-
SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);
|
1510
|
-
goto error;
|
1511
|
-
}
|
1512
|
-
|
1513
|
-
t = parser->content_length;
|
1514
|
-
t *= 10;
|
1515
|
-
t += ch - '0';
|
1516
|
-
|
1517
|
-
/* Overflow? Test against a conservative limit for simplicity. */
|
1518
|
-
if ((ULLONG_MAX - 10) / 10 < parser->content_length) {
|
1519
|
-
SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);
|
1520
|
-
goto error;
|
1521
|
-
}
|
1522
|
-
|
1523
|
-
parser->content_length = t;
|
1524
|
-
break;
|
1525
|
-
}
|
1526
|
-
|
1527
|
-
/* Transfer-Encoding: chunked */
|
1528
|
-
case h_matching_transfer_encoding_chunked:
|
1529
|
-
parser->index++;
|
1530
|
-
if (parser->index > sizeof(CHUNKED)-1
|
1531
|
-
|| c != CHUNKED[parser->index]) {
|
1532
|
-
parser->header_state = h_general;
|
1533
|
-
} else if (parser->index == sizeof(CHUNKED)-2) {
|
1534
|
-
parser->header_state = h_transfer_encoding_chunked;
|
1535
|
-
}
|
1536
|
-
break;
|
1537
|
-
|
1538
|
-
/* looking for 'Connection: keep-alive' */
|
1539
|
-
case h_matching_connection_keep_alive:
|
1540
|
-
parser->index++;
|
1541
|
-
if (parser->index > sizeof(KEEP_ALIVE)-1
|
1542
|
-
|| c != KEEP_ALIVE[parser->index]) {
|
1543
|
-
parser->header_state = h_general;
|
1544
|
-
} else if (parser->index == sizeof(KEEP_ALIVE)-2) {
|
1545
|
-
parser->header_state = h_connection_keep_alive;
|
1546
|
-
}
|
1547
|
-
break;
|
1548
|
-
|
1549
|
-
/* looking for 'Connection: close' */
|
1550
|
-
case h_matching_connection_close:
|
1551
|
-
parser->index++;
|
1552
|
-
if (parser->index > sizeof(CLOSE)-1 || c != CLOSE[parser->index]) {
|
1553
|
-
parser->header_state = h_general;
|
1554
|
-
} else if (parser->index == sizeof(CLOSE)-2) {
|
1555
|
-
parser->header_state = h_connection_close;
|
1556
|
-
}
|
1557
|
-
break;
|
1558
|
-
|
1559
|
-
case h_transfer_encoding_chunked:
|
1560
|
-
case h_connection_keep_alive:
|
1561
|
-
case h_connection_close:
|
1562
|
-
if (ch != ' ') parser->header_state = h_general;
|
1563
|
-
break;
|
1564
|
-
|
1565
|
-
default:
|
1566
|
-
parser->state = s_header_value;
|
1567
|
-
parser->header_state = h_general;
|
1568
|
-
break;
|
1569
|
-
}
|
1570
|
-
break;
|
1571
|
-
}
|
1572
|
-
|
1573
|
-
case s_header_almost_done:
|
1574
|
-
{
|
1575
|
-
STRICT_CHECK(ch != LF);
|
1576
|
-
|
1577
|
-
parser->state = s_header_value_lws;
|
1578
|
-
break;
|
1579
|
-
}
|
1580
|
-
|
1581
|
-
case s_header_value_lws:
|
1582
|
-
{
|
1583
|
-
if (ch == ' ' || ch == '\t') {
|
1584
|
-
parser->state = s_header_value_start;
|
1585
|
-
goto reexecute_byte;
|
1586
|
-
}
|
1587
|
-
|
1588
|
-
/* finished the header */
|
1589
|
-
switch (parser->header_state) {
|
1590
|
-
case h_connection_keep_alive:
|
1591
|
-
parser->flags |= F_CONNECTION_KEEP_ALIVE;
|
1592
|
-
break;
|
1593
|
-
case h_connection_close:
|
1594
|
-
parser->flags |= F_CONNECTION_CLOSE;
|
1595
|
-
break;
|
1596
|
-
case h_transfer_encoding_chunked:
|
1597
|
-
parser->flags |= F_CHUNKED;
|
1598
|
-
break;
|
1599
|
-
default:
|
1600
|
-
break;
|
1601
|
-
}
|
1602
|
-
|
1603
|
-
parser->state = s_header_field_start;
|
1604
|
-
goto reexecute_byte;
|
1605
|
-
}
|
1606
|
-
|
1607
|
-
case s_header_value_discard_ws_almost_done:
|
1608
|
-
{
|
1609
|
-
STRICT_CHECK(ch != LF);
|
1610
|
-
parser->state = s_header_value_discard_lws;
|
1611
|
-
break;
|
1612
|
-
}
|
1613
|
-
|
1614
|
-
case s_header_value_discard_lws:
|
1615
|
-
{
|
1616
|
-
if (ch == ' ' || ch == '\t') {
|
1617
|
-
parser->state = s_header_value_discard_ws;
|
1618
|
-
break;
|
1619
|
-
} else {
|
1620
|
-
/* header value was empty */
|
1621
|
-
MARK(header_value);
|
1622
|
-
parser->state = s_header_field_start;
|
1623
|
-
CALLBACK_DATA_NOADVANCE(header_value);
|
1624
|
-
goto reexecute_byte;
|
1625
|
-
}
|
1626
|
-
}
|
1627
|
-
|
1628
|
-
case s_headers_almost_done:
|
1629
|
-
{
|
1630
|
-
STRICT_CHECK(ch != LF);
|
1631
|
-
|
1632
|
-
if (parser->flags & F_TRAILING) {
|
1633
|
-
/* End of a chunked request */
|
1634
|
-
parser->state = NEW_MESSAGE();
|
1635
|
-
CALLBACK_NOTIFY(message_complete);
|
1636
|
-
break;
|
1637
|
-
}
|
1638
|
-
|
1639
|
-
parser->state = s_headers_done;
|
1640
|
-
|
1641
|
-
/* Set this here so that on_headers_complete() callbacks can see it */
|
1642
|
-
parser->upgrade =
|
1643
|
-
(parser->flags & F_UPGRADE || parser->method == HTTP_CONNECT);
|
1644
|
-
|
1645
|
-
/* Here we call the headers_complete callback. This is somewhat
|
1646
|
-
* different than other callbacks because if the user returns 1, we
|
1647
|
-
* will interpret that as saying that this message has no body. This
|
1648
|
-
* is needed for the annoying case of recieving a response to a HEAD
|
1649
|
-
* request.
|
1650
|
-
*
|
1651
|
-
* We'd like to use CALLBACK_NOTIFY_NOADVANCE() here but we cannot, so
|
1652
|
-
* we have to simulate it by handling a change in errno below.
|
1653
|
-
*/
|
1654
|
-
if (settings->on_headers_complete) {
|
1655
|
-
switch (settings->on_headers_complete(parser)) {
|
1656
|
-
case 0:
|
1657
|
-
break;
|
1658
|
-
|
1659
|
-
case 1:
|
1660
|
-
parser->flags |= F_SKIPBODY;
|
1661
|
-
break;
|
1662
|
-
|
1663
|
-
default:
|
1664
|
-
SET_ERRNO(HPE_CB_headers_complete);
|
1665
|
-
return p - data; /* Error */
|
1666
|
-
}
|
1667
|
-
}
|
1668
|
-
|
1669
|
-
if (HTTP_PARSER_ERRNO(parser) != HPE_OK) {
|
1670
|
-
return p - data;
|
1671
|
-
}
|
1672
|
-
|
1673
|
-
goto reexecute_byte;
|
1674
|
-
}
|
1675
|
-
|
1676
|
-
case s_headers_done:
|
1677
|
-
{
|
1678
|
-
STRICT_CHECK(ch != LF);
|
1679
|
-
|
1680
|
-
parser->nread = 0;
|
1681
|
-
|
1682
|
-
/* Exit, the rest of the connect is in a different protocol. */
|
1683
|
-
if (parser->upgrade) {
|
1684
|
-
parser->state = NEW_MESSAGE();
|
1685
|
-
CALLBACK_NOTIFY(message_complete);
|
1686
|
-
return (p - data) + 1;
|
1687
|
-
}
|
1688
|
-
|
1689
|
-
if (parser->flags & F_SKIPBODY) {
|
1690
|
-
parser->state = NEW_MESSAGE();
|
1691
|
-
CALLBACK_NOTIFY(message_complete);
|
1692
|
-
} else if (parser->flags & F_CHUNKED) {
|
1693
|
-
/* chunked encoding - ignore Content-Length header */
|
1694
|
-
parser->state = s_chunk_size_start;
|
1695
|
-
} else {
|
1696
|
-
if (parser->content_length == 0) {
|
1697
|
-
/* Content-Length header given but zero: Content-Length: 0\r\n */
|
1698
|
-
parser->state = NEW_MESSAGE();
|
1699
|
-
CALLBACK_NOTIFY(message_complete);
|
1700
|
-
} else if (parser->content_length != ULLONG_MAX) {
|
1701
|
-
/* Content-Length header given and non-zero */
|
1702
|
-
parser->state = s_body_identity;
|
1703
|
-
} else {
|
1704
|
-
if (parser->type == HTTP_REQUEST ||
|
1705
|
-
!http_message_needs_eof(parser)) {
|
1706
|
-
/* Assume content-length 0 - read the next */
|
1707
|
-
parser->state = NEW_MESSAGE();
|
1708
|
-
CALLBACK_NOTIFY(message_complete);
|
1709
|
-
} else {
|
1710
|
-
/* Read body until EOF */
|
1711
|
-
parser->state = s_body_identity_eof;
|
1712
|
-
}
|
1713
|
-
}
|
1714
|
-
}
|
1715
|
-
|
1716
|
-
break;
|
1717
|
-
}
|
1718
|
-
|
1719
|
-
case s_body_identity:
|
1720
|
-
{
|
1721
|
-
boost::uint64_t to_read = MIN(parser->content_length,
|
1722
|
-
(boost::uint64_t) ((data + len) - p));
|
1723
|
-
|
1724
|
-
assert(parser->content_length != 0
|
1725
|
-
&& parser->content_length != ULLONG_MAX);
|
1726
|
-
|
1727
|
-
/* The difference between advancing content_length and p is because
|
1728
|
-
* the latter will automaticaly advance on the next loop iteration.
|
1729
|
-
* Further, if content_length ends up at 0, we want to see the last
|
1730
|
-
* byte again for our message complete callback.
|
1731
|
-
*/
|
1732
|
-
MARK(body);
|
1733
|
-
parser->content_length -= to_read;
|
1734
|
-
p += to_read - 1;
|
1735
|
-
|
1736
|
-
if (parser->content_length == 0) {
|
1737
|
-
parser->state = s_message_done;
|
1738
|
-
|
1739
|
-
/* Mimic CALLBACK_DATA_NOADVANCE() but with one extra byte.
|
1740
|
-
*
|
1741
|
-
* The alternative to doing this is to wait for the next byte to
|
1742
|
-
* trigger the data callback, just as in every other case. The
|
1743
|
-
* problem with this is that this makes it difficult for the test
|
1744
|
-
* harness to distinguish between complete-on-EOF and
|
1745
|
-
* complete-on-length. It's not clear that this distinction is
|
1746
|
-
* important for applications, but let's keep it for now.
|
1747
|
-
*/
|
1748
|
-
CALLBACK_DATA_(body, p - body_mark + 1, p - data);
|
1749
|
-
goto reexecute_byte;
|
1750
|
-
}
|
1751
|
-
|
1752
|
-
break;
|
1753
|
-
}
|
1754
|
-
|
1755
|
-
/* read until EOF */
|
1756
|
-
case s_body_identity_eof:
|
1757
|
-
MARK(body);
|
1758
|
-
p = data + len - 1;
|
1759
|
-
|
1760
|
-
break;
|
1761
|
-
|
1762
|
-
case s_message_done:
|
1763
|
-
parser->state = NEW_MESSAGE();
|
1764
|
-
CALLBACK_NOTIFY(message_complete);
|
1765
|
-
break;
|
1766
|
-
|
1767
|
-
case s_chunk_size_start:
|
1768
|
-
{
|
1769
|
-
assert(parser->nread == 1);
|
1770
|
-
assert(parser->flags & F_CHUNKED);
|
1771
|
-
|
1772
|
-
unhex_val = unhex[(unsigned char)ch];
|
1773
|
-
if (unhex_val == -1) {
|
1774
|
-
SET_ERRNO(HPE_INVALID_CHUNK_SIZE);
|
1775
|
-
goto error;
|
1776
|
-
}
|
1777
|
-
|
1778
|
-
parser->content_length = unhex_val;
|
1779
|
-
parser->state = s_chunk_size;
|
1780
|
-
break;
|
1781
|
-
}
|
1782
|
-
|
1783
|
-
case s_chunk_size:
|
1784
|
-
{
|
1785
|
-
boost::uint64_t t;
|
1786
|
-
|
1787
|
-
assert(parser->flags & F_CHUNKED);
|
1788
|
-
|
1789
|
-
if (ch == CR) {
|
1790
|
-
parser->state = s_chunk_size_almost_done;
|
1791
|
-
break;
|
1792
|
-
}
|
1793
|
-
|
1794
|
-
unhex_val = unhex[(unsigned char)ch];
|
1795
|
-
|
1796
|
-
if (unhex_val == -1) {
|
1797
|
-
if (ch == ';' || ch == ' ') {
|
1798
|
-
parser->state = s_chunk_parameters;
|
1799
|
-
break;
|
1800
|
-
}
|
1801
|
-
|
1802
|
-
SET_ERRNO(HPE_INVALID_CHUNK_SIZE);
|
1803
|
-
goto error;
|
1804
|
-
}
|
1805
|
-
|
1806
|
-
t = parser->content_length;
|
1807
|
-
t *= 16;
|
1808
|
-
t += unhex_val;
|
1809
|
-
|
1810
|
-
/* Overflow? Test against a conservative limit for simplicity. */
|
1811
|
-
if ((ULLONG_MAX - 16) / 16 < parser->content_length) {
|
1812
|
-
SET_ERRNO(HPE_INVALID_CONTENT_LENGTH);
|
1813
|
-
goto error;
|
1814
|
-
}
|
1815
|
-
|
1816
|
-
parser->content_length = t;
|
1817
|
-
break;
|
1818
|
-
}
|
1819
|
-
|
1820
|
-
case s_chunk_parameters:
|
1821
|
-
{
|
1822
|
-
assert(parser->flags & F_CHUNKED);
|
1823
|
-
/* just ignore this shit. TODO check for overflow */
|
1824
|
-
if (ch == CR) {
|
1825
|
-
parser->state = s_chunk_size_almost_done;
|
1826
|
-
break;
|
1827
|
-
}
|
1828
|
-
break;
|
1829
|
-
}
|
1830
|
-
|
1831
|
-
case s_chunk_size_almost_done:
|
1832
|
-
{
|
1833
|
-
assert(parser->flags & F_CHUNKED);
|
1834
|
-
STRICT_CHECK(ch != LF);
|
1835
|
-
|
1836
|
-
parser->nread = 0;
|
1837
|
-
|
1838
|
-
if (parser->content_length == 0) {
|
1839
|
-
parser->flags |= F_TRAILING;
|
1840
|
-
parser->state = s_header_field_start;
|
1841
|
-
} else {
|
1842
|
-
parser->state = s_chunk_data;
|
1843
|
-
}
|
1844
|
-
break;
|
1845
|
-
}
|
1846
|
-
|
1847
|
-
case s_chunk_data:
|
1848
|
-
{
|
1849
|
-
boost::uint64_t to_read = MIN(parser->content_length,
|
1850
|
-
(boost::uint64_t) ((data + len) - p));
|
1851
|
-
|
1852
|
-
assert(parser->flags & F_CHUNKED);
|
1853
|
-
assert(parser->content_length != 0
|
1854
|
-
&& parser->content_length != ULLONG_MAX);
|
1855
|
-
|
1856
|
-
/* See the explanation in s_body_identity for why the content
|
1857
|
-
* length and data pointers are managed this way.
|
1858
|
-
*/
|
1859
|
-
MARK(body);
|
1860
|
-
parser->content_length -= to_read;
|
1861
|
-
p += to_read - 1;
|
1862
|
-
|
1863
|
-
if (parser->content_length == 0) {
|
1864
|
-
parser->state = s_chunk_data_almost_done;
|
1865
|
-
}
|
1866
|
-
|
1867
|
-
break;
|
1868
|
-
}
|
1869
|
-
|
1870
|
-
case s_chunk_data_almost_done:
|
1871
|
-
assert(parser->flags & F_CHUNKED);
|
1872
|
-
assert(parser->content_length == 0);
|
1873
|
-
STRICT_CHECK(ch != CR);
|
1874
|
-
parser->state = s_chunk_data_done;
|
1875
|
-
CALLBACK_DATA(body);
|
1876
|
-
break;
|
1877
|
-
|
1878
|
-
case s_chunk_data_done:
|
1879
|
-
assert(parser->flags & F_CHUNKED);
|
1880
|
-
STRICT_CHECK(ch != LF);
|
1881
|
-
parser->nread = 0;
|
1882
|
-
parser->state = s_chunk_size_start;
|
1883
|
-
break;
|
1884
|
-
|
1885
|
-
default:
|
1886
|
-
assert(0 && "unhandled state");
|
1887
|
-
SET_ERRNO(HPE_INVALID_INTERNAL_STATE);
|
1888
|
-
goto error;
|
1889
|
-
}
|
1890
|
-
}
|
1891
|
-
|
1892
|
-
/* Run callbacks for any marks that we have leftover after we ran our of
|
1893
|
-
* bytes. There should be at most one of these set, so it's OK to invoke
|
1894
|
-
* them in series (unset marks will not result in callbacks).
|
1895
|
-
*
|
1896
|
-
* We use the NOADVANCE() variety of callbacks here because 'p' has already
|
1897
|
-
* overflowed 'data' and this allows us to correct for the off-by-one that
|
1898
|
-
* we'd otherwise have (since CALLBACK_DATA() is meant to be run with a 'p'
|
1899
|
-
* value that's in-bounds).
|
1900
|
-
*/
|
1901
|
-
|
1902
|
-
assert(((header_field_mark ? 1 : 0) +
|
1903
|
-
(header_value_mark ? 1 : 0) +
|
1904
|
-
(url_mark ? 1 : 0) +
|
1905
|
-
(body_mark ? 1 : 0) +
|
1906
|
-
(status_mark ? 1 : 0)) <= 1);
|
1907
|
-
|
1908
|
-
CALLBACK_DATA_NOADVANCE(header_field);
|
1909
|
-
CALLBACK_DATA_NOADVANCE(header_value);
|
1910
|
-
CALLBACK_DATA_NOADVANCE(url);
|
1911
|
-
CALLBACK_DATA_NOADVANCE(body);
|
1912
|
-
CALLBACK_DATA_NOADVANCE(status);
|
1913
|
-
|
1914
|
-
return len;
|
1915
|
-
|
1916
|
-
error:
|
1917
|
-
if (HTTP_PARSER_ERRNO(parser) == HPE_OK) {
|
1918
|
-
SET_ERRNO(HPE_UNKNOWN);
|
1919
|
-
}
|
1920
|
-
|
1921
|
-
return (p - data);
|
1922
|
-
}
|
1923
|
-
|
1924
|
-
|
1925
|
-
/* Does the parser need to see an EOF to find the end of the message? */
|
1926
|
-
int
|
1927
|
-
http_message_needs_eof (const http_parser *parser)
|
1928
|
-
{
|
1929
|
-
if (parser->type == HTTP_REQUEST) {
|
1930
|
-
return 0;
|
1931
|
-
}
|
1932
|
-
|
1933
|
-
/* See RFC 2616 section 4.4 */
|
1934
|
-
if (parser->status_code / 100 == 1 || /* 1xx e.g. Continue */
|
1935
|
-
parser->status_code == 204 || /* No Content */
|
1936
|
-
parser->status_code == 304 || /* Not Modified */
|
1937
|
-
parser->flags & F_SKIPBODY) { /* response to a HEAD request */
|
1938
|
-
return 0;
|
1939
|
-
}
|
1940
|
-
|
1941
|
-
if ((parser->flags & F_CHUNKED) || parser->content_length != ULLONG_MAX) {
|
1942
|
-
return 0;
|
1943
|
-
}
|
1944
|
-
|
1945
|
-
return 1;
|
1946
|
-
}
|
1947
|
-
|
1948
|
-
|
1949
|
-
int
|
1950
|
-
http_should_keep_alive (const http_parser *parser)
|
1951
|
-
{
|
1952
|
-
if (parser->http_major > 0 && parser->http_minor > 0) {
|
1953
|
-
/* HTTP/1.1 */
|
1954
|
-
if (parser->flags & F_CONNECTION_CLOSE) {
|
1955
|
-
return 0;
|
1956
|
-
}
|
1957
|
-
} else {
|
1958
|
-
/* HTTP/1.0 or earlier */
|
1959
|
-
if (!(parser->flags & F_CONNECTION_KEEP_ALIVE)) {
|
1960
|
-
return 0;
|
1961
|
-
}
|
1962
|
-
}
|
1963
|
-
|
1964
|
-
return !http_message_needs_eof(parser);
|
1965
|
-
}
|
1966
|
-
|
1967
|
-
|
1968
|
-
const char *
|
1969
|
-
http_method_str (enum http_method m)
|
1970
|
-
{
|
1971
|
-
return ELEM_AT(method_strings, m, "<unknown>");
|
1972
|
-
}
|
1973
|
-
|
1974
|
-
|
1975
|
-
void
|
1976
|
-
http_parser_init (http_parser *parser, enum http_parser_type t)
|
1977
|
-
{
|
1978
|
-
void *data = parser->data; /* preserve application data */
|
1979
|
-
memset(parser, 0, sizeof(*parser));
|
1980
|
-
parser->data = data;
|
1981
|
-
parser->type = t;
|
1982
|
-
parser->state = (t == HTTP_REQUEST ? s_start_req : (t == HTTP_RESPONSE ? s_start_res : s_start_req_or_res));
|
1983
|
-
parser->http_errno = HPE_OK;
|
1984
|
-
}
|
1985
|
-
|
1986
|
-
const char *
|
1987
|
-
http_errno_name(enum http_errno err) {
|
1988
|
-
assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0])));
|
1989
|
-
return http_strerror_tab[err].name;
|
1990
|
-
}
|
1991
|
-
|
1992
|
-
const char *
|
1993
|
-
http_errno_description(enum http_errno err) {
|
1994
|
-
assert(err < (sizeof(http_strerror_tab)/sizeof(http_strerror_tab[0])));
|
1995
|
-
return http_strerror_tab[err].description;
|
1996
|
-
}
|
1997
|
-
|
1998
|
-
static enum http_host_state
|
1999
|
-
http_parse_host_char(enum http_host_state s, const char ch) {
|
2000
|
-
switch(s) {
|
2001
|
-
case s_http_userinfo:
|
2002
|
-
case s_http_userinfo_start:
|
2003
|
-
if (ch == '@') {
|
2004
|
-
return s_http_host_start;
|
2005
|
-
}
|
2006
|
-
|
2007
|
-
if (IS_USERINFO_CHAR(ch)) {
|
2008
|
-
return s_http_userinfo;
|
2009
|
-
}
|
2010
|
-
break;
|
2011
|
-
|
2012
|
-
case s_http_host_start:
|
2013
|
-
if (ch == '[') {
|
2014
|
-
return s_http_host_v6_start;
|
2015
|
-
}
|
2016
|
-
|
2017
|
-
if (IS_HOST_CHAR(ch)) {
|
2018
|
-
return s_http_host;
|
2019
|
-
}
|
2020
|
-
|
2021
|
-
break;
|
2022
|
-
|
2023
|
-
case s_http_host:
|
2024
|
-
if (IS_HOST_CHAR(ch)) {
|
2025
|
-
return s_http_host;
|
2026
|
-
}
|
2027
|
-
|
2028
|
-
/* FALLTHROUGH */
|
2029
|
-
case s_http_host_v6_end:
|
2030
|
-
if (ch == ':') {
|
2031
|
-
return s_http_host_port_start;
|
2032
|
-
}
|
2033
|
-
|
2034
|
-
break;
|
2035
|
-
|
2036
|
-
case s_http_host_v6:
|
2037
|
-
if (ch == ']') {
|
2038
|
-
return s_http_host_v6_end;
|
2039
|
-
}
|
2040
|
-
|
2041
|
-
/* FALLTHROUGH */
|
2042
|
-
case s_http_host_v6_start:
|
2043
|
-
if (IS_HEX(ch) || ch == ':' || ch == '.') {
|
2044
|
-
return s_http_host_v6;
|
2045
|
-
}
|
2046
|
-
|
2047
|
-
break;
|
2048
|
-
|
2049
|
-
case s_http_host_port:
|
2050
|
-
case s_http_host_port_start:
|
2051
|
-
if (IS_NUM(ch)) {
|
2052
|
-
return s_http_host_port;
|
2053
|
-
}
|
2054
|
-
|
2055
|
-
break;
|
2056
|
-
|
2057
|
-
default:
|
2058
|
-
break;
|
2059
|
-
}
|
2060
|
-
return s_http_host_dead;
|
2061
|
-
}
|
2062
|
-
|
2063
|
-
static int
|
2064
|
-
http_parse_host(const char * buf, struct http_parser_url *u, int found_at) {
|
2065
|
-
assert(u->field_set & (1 << UF_HOST));
|
2066
|
-
enum http_host_state s;
|
2067
|
-
|
2068
|
-
const char *p;
|
2069
|
-
size_t buflen = u->field_data[UF_HOST].off + u->field_data[UF_HOST].len;
|
2070
|
-
|
2071
|
-
u->field_data[UF_HOST].len = 0;
|
2072
|
-
|
2073
|
-
s = found_at ? s_http_userinfo_start : s_http_host_start;
|
2074
|
-
|
2075
|
-
for (p = buf + u->field_data[UF_HOST].off; p < buf + buflen; p++) {
|
2076
|
-
enum http_host_state new_s = http_parse_host_char(s, *p);
|
2077
|
-
|
2078
|
-
if (new_s == s_http_host_dead) {
|
2079
|
-
return 1;
|
2080
|
-
}
|
2081
|
-
|
2082
|
-
switch(new_s) {
|
2083
|
-
case s_http_host:
|
2084
|
-
if (s != s_http_host) {
|
2085
|
-
u->field_data[UF_HOST].off = p - buf;
|
2086
|
-
}
|
2087
|
-
u->field_data[UF_HOST].len++;
|
2088
|
-
break;
|
2089
|
-
|
2090
|
-
case s_http_host_v6:
|
2091
|
-
if (s != s_http_host_v6) {
|
2092
|
-
u->field_data[UF_HOST].off = p - buf;
|
2093
|
-
}
|
2094
|
-
u->field_data[UF_HOST].len++;
|
2095
|
-
break;
|
2096
|
-
|
2097
|
-
case s_http_host_port:
|
2098
|
-
if (s != s_http_host_port) {
|
2099
|
-
u->field_data[UF_PORT].off = p - buf;
|
2100
|
-
u->field_data[UF_PORT].len = 0;
|
2101
|
-
u->field_set |= (1 << UF_PORT);
|
2102
|
-
}
|
2103
|
-
u->field_data[UF_PORT].len++;
|
2104
|
-
break;
|
2105
|
-
|
2106
|
-
case s_http_userinfo:
|
2107
|
-
if (s != s_http_userinfo) {
|
2108
|
-
u->field_data[UF_USERINFO].off = p - buf ;
|
2109
|
-
u->field_data[UF_USERINFO].len = 0;
|
2110
|
-
u->field_set |= (1 << UF_USERINFO);
|
2111
|
-
}
|
2112
|
-
u->field_data[UF_USERINFO].len++;
|
2113
|
-
break;
|
2114
|
-
|
2115
|
-
default:
|
2116
|
-
break;
|
2117
|
-
}
|
2118
|
-
s = new_s;
|
2119
|
-
}
|
2120
|
-
|
2121
|
-
/* Make sure we don't end somewhere unexpected */
|
2122
|
-
switch (s) {
|
2123
|
-
case s_http_host_start:
|
2124
|
-
case s_http_host_v6_start:
|
2125
|
-
case s_http_host_v6:
|
2126
|
-
case s_http_host_port_start:
|
2127
|
-
case s_http_userinfo:
|
2128
|
-
case s_http_userinfo_start:
|
2129
|
-
return 1;
|
2130
|
-
default:
|
2131
|
-
break;
|
2132
|
-
}
|
2133
|
-
|
2134
|
-
return 0;
|
2135
|
-
}
|
2136
|
-
|
2137
|
-
int
|
2138
|
-
http_parser_parse_url(const char *buf, size_t buflen, int is_connect,
|
2139
|
-
struct http_parser_url *u)
|
2140
|
-
{
|
2141
|
-
enum state s;
|
2142
|
-
const char *p;
|
2143
|
-
enum http_parser_url_fields uf, old_uf;
|
2144
|
-
int found_at = 0;
|
2145
|
-
|
2146
|
-
u->port = u->field_set = 0;
|
2147
|
-
s = is_connect ? s_req_server_start : s_req_spaces_before_url;
|
2148
|
-
old_uf = UF_MAX;
|
2149
|
-
|
2150
|
-
for (p = buf; p < buf + buflen; p++) {
|
2151
|
-
s = parse_url_char(s, *p);
|
2152
|
-
|
2153
|
-
/* Figure out the next field that we're operating on */
|
2154
|
-
switch (s) {
|
2155
|
-
case s_dead:
|
2156
|
-
return 1;
|
2157
|
-
|
2158
|
-
/* Skip delimeters */
|
2159
|
-
case s_req_schema_slash:
|
2160
|
-
case s_req_schema_slash_slash:
|
2161
|
-
case s_req_server_start:
|
2162
|
-
case s_req_query_string_start:
|
2163
|
-
case s_req_fragment_start:
|
2164
|
-
continue;
|
2165
|
-
|
2166
|
-
case s_req_schema:
|
2167
|
-
uf = UF_SCHEMA;
|
2168
|
-
break;
|
2169
|
-
|
2170
|
-
case s_req_server_with_at:
|
2171
|
-
found_at = 1;
|
2172
|
-
|
2173
|
-
/* FALLTROUGH */
|
2174
|
-
case s_req_server:
|
2175
|
-
uf = UF_HOST;
|
2176
|
-
break;
|
2177
|
-
|
2178
|
-
case s_req_path:
|
2179
|
-
uf = UF_PATH;
|
2180
|
-
break;
|
2181
|
-
|
2182
|
-
case s_req_query_string:
|
2183
|
-
uf = UF_QUERY;
|
2184
|
-
break;
|
2185
|
-
|
2186
|
-
case s_req_fragment:
|
2187
|
-
uf = UF_FRAGMENT;
|
2188
|
-
break;
|
2189
|
-
|
2190
|
-
default:
|
2191
|
-
assert(!"Unexpected state");
|
2192
|
-
return 1;
|
2193
|
-
}
|
2194
|
-
|
2195
|
-
/* Nothing's changed; soldier on */
|
2196
|
-
if (uf == old_uf) {
|
2197
|
-
u->field_data[uf].len++;
|
2198
|
-
continue;
|
2199
|
-
}
|
2200
|
-
|
2201
|
-
u->field_data[uf].off = p - buf;
|
2202
|
-
u->field_data[uf].len = 1;
|
2203
|
-
|
2204
|
-
u->field_set |= (1 << uf);
|
2205
|
-
old_uf = uf;
|
2206
|
-
}
|
2207
|
-
|
2208
|
-
/* host must be present if there is a schema */
|
2209
|
-
/* parsing http:///toto will fail */
|
2210
|
-
if ((u->field_set & (1 << UF_SCHEMA)) &&
|
2211
|
-
(u->field_set & (1 << UF_HOST)) == 0) {
|
2212
|
-
return 1;
|
2213
|
-
}
|
2214
|
-
|
2215
|
-
if (u->field_set & (1 << UF_HOST)) {
|
2216
|
-
if (http_parse_host(buf, u, found_at) != 0) {
|
2217
|
-
return 1;
|
2218
|
-
}
|
2219
|
-
}
|
2220
|
-
|
2221
|
-
/* CONNECT requests can only contain "hostname:port" */
|
2222
|
-
if (is_connect && u->field_set != ((1 << UF_HOST)|(1 << UF_PORT))) {
|
2223
|
-
return 1;
|
2224
|
-
}
|
2225
|
-
|
2226
|
-
if (u->field_set & (1 << UF_PORT)) {
|
2227
|
-
/* Don't bother with endp; we've already validated the string */
|
2228
|
-
unsigned long v = strtoul(buf + u->field_data[UF_PORT].off, NULL, 10);
|
2229
|
-
|
2230
|
-
/* Ports have a max value of 2^16 */
|
2231
|
-
if (v > 0xffff) {
|
2232
|
-
return 1;
|
2233
|
-
}
|
2234
|
-
|
2235
|
-
u->port = (boost::uint16_t) v;
|
2236
|
-
}
|
2237
|
-
|
2238
|
-
return 0;
|
2239
|
-
}
|
2240
|
-
|
2241
|
-
void
|
2242
|
-
http_parser_pause(http_parser *parser, int paused) {
|
2243
|
-
/* Users should only be pausing/unpausing a parser that is not in an error
|
2244
|
-
* state. In non-debug builds, there's not much that we can do about this
|
2245
|
-
* other than ignore it.
|
2246
|
-
*/
|
2247
|
-
if (HTTP_PARSER_ERRNO(parser) == HPE_OK ||
|
2248
|
-
HTTP_PARSER_ERRNO(parser) == HPE_PAUSED) {
|
2249
|
-
SET_ERRNO((paused) ? HPE_PAUSED : HPE_OK);
|
2250
|
-
} else {
|
2251
|
-
assert(0 && "Attempting to pause parser in error state");
|
2252
|
-
}
|
2253
|
-
}
|
2254
|
-
|
2255
|
-
int
|
2256
|
-
http_body_is_final(const struct http_parser *parser) {
|
2257
|
-
return parser->state == s_message_done;
|
2258
|
-
}
|
2259
|
-
|
2260
|
-
unsigned long
|
2261
|
-
http_parser_version(void) {
|
2262
|
-
return HTTP_PARSER_VERSION_MAJOR * 0x10000 |
|
2263
|
-
HTTP_PARSER_VERSION_MINOR * 0x00100 |
|
2264
|
-
HTTP_PARSER_VERSION_PATCH * 0x00001;
|
2265
|
-
}
|