1081 Commits

Author SHA1 Message Date
Klemens Morgenstern
f9433d22d0 Set version to 348. 2023-06-28 12:35:52 +08:00
Klemens Morgenstern
72c2eeb398 ssl_stream doesn't use BOOST_BEAST_ASYNC_TPARAM1 due to clang errors.
Closes #2661
2023-06-20 10:40:20 +08:00
Ed Catmur
a23e24ffee Reimplement (C++23) deprecated std::aligned_storage (#2680)
Use boost::aligned_storage instead of std::.

The latter is deprecated in C++23.

---------

Co-authored-by: Ed Catmur <edward.catmur@mavensecurities.com>
2023-05-15 09:03:10 +08:00
Edward Nolan
cd6b79db5a headers using std::int8_t et al. include <csdint>. 2023-05-15 08:49:53 +08:00
Michiel De Witte
a4718ee87b change upgrade to Upgrade as connection header value 2023-05-12 18:46:55 +08:00
Klemens Morgenstern
3dddb5fecf Set version to 347. 2023-02-20 14:06:17 +08:00
Edward Nolan
8dc6daa507 Address bind_handler ambiguous overload error when boost/bind/std_placeholders.hpp is included (#2638)
* Address bind_handler ambiguous overload error when boost/bind/std_placeholders.hpp is included

Previously, the implementation of bind_handler made the assumption
that the trait boost::is_placeholder would be false for types
corresponding to values in the std::placeholders namespace.

However, boost/bind commit c85b31e3d200dda2a73cf0027a82c6d8e29066f8,
`Support use of standard placeholders with boost::bind`, added a new
header, boost/bind/std_placeholders.hpp, which adds specializations to
 boost::is_placeholder for std::placeholders types.

When this header is included before a use of boost::bind_handler, it
results in compiler errors like the following, due to an internal
helper function having overloads for
enable_if<boost::is_placeholder...> and
enable_if<std::is_placeholder...>, which were previously assumed to be
mutually exclusive, but for which both conditions now are true:

../../../boost/beast/core/detail/bind_handler.hpp:126:18: error: call of overloaded 'extract(std::_Placeholder<1>, boost::beast::detail::tuple<int&&>)' is ambiguous
  126 |         h(extract(detail::get<S>(std::move(args)),
      |           ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  127 |             std::forward<ValsTuple>(vals))...);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This header is included in boost/bind/bind.hpp, and is transitively
included by headers in many boost libraries including:

algorithm
asio
atomic
graph
msm
multi_index
property_tree
ptr_container
python
signals2
test
thread

Making it possible that an include from one of these libraries will
randomly cause bind_handler to fail to compile.

This change addresses the issue by eliminating one of the ambiguous
overloads and ensuring that boost/bind/std_placeholders.hpp is
included in the bind_handler implementation file, so that the
enable_if<boost::is_placeholder...> overload can handle both
boost::placeholders and std::placeholders values. It also explicitly
adds a boost/bind/std_placeholders.hpp include to the bind_handler
unit test to prevent this issue from regressing.

* Address boost/bind/std_placeholders.hpp feature guards

boost/bind/std_placeholders.hpp has the following feature guards:

if !defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)

If this check fails, it will not detect std::placeholders values as
placeholders, making the previous solution fail.

This update restores the std::is_placeholder overload and adjusts the
SFINAE for the boost::is_placeholder overload so that it triggers only
if std::is_placeholder is false, making bind_handler work regardless
of whether std_placeholders.hpp's feature guard applies.

---------

Co-authored-by: Edward Nolan <enolan@maystreet.com>
2023-02-17 13:50:04 +08:00
Klemens Morgenstern
341ac7591b Set version to 346. 2023-02-06 04:22:37 +08:00
Klemens
1d965752b2 beast file_body & file support seek.
win32 file_body handles seek correctly.
Added seek to win32 file.
file_body_writer handles offsets.
2023-02-05 02:57:41 +08:00
Klemens
4ff4c79d5b file_body buffer size can be configured. 2023-02-05 02:57:41 +08:00
Klemens
51a73f2e64 Adjusted append docs.
Closes #2568.
2023-02-02 14:00:19 +08:00
Klemens
c9900625ea buffers_cat uses BOOST_NORETURN. 2023-01-23 21:18:27 +08:00
Klemens
e88185f765 basic_stream doesn't use try-catch with no-exceptions. 2023-01-23 21:18:27 +08:00
Jeremiah Rodriguez
7453ce3260 Fix incorrect ssl_stream async_handshake concept 2023-01-23 17:50:03 +08:00
Klemens Morgenstern
aef9c88c9d error categories use numeric id 2023-01-23 17:48:28 +08:00
Klemens
334b9871be Fixed timer usage inside basic_stream.
Closes #2602.
2022-12-24 09:40:08 +08:00
Klemens
5032a20d9d operator= is used to assign ecs without loc. 2022-12-22 11:51:22 +08:00
Klemens
027c544a3a test::handler copies the source location. 2022-12-20 18:01:12 +08:00
Klemens Morgenstern
48f82ac817 Switched self-posting to the io-object's executor.
This is a conceptual change in the recent asio version that is reflected in any_completion_handler.
2022-12-20 14:45:26 +08:00
Klemens
860bfbdeab Added source-location to all ecs.
Closes #2475.
2022-12-20 13:16:39 +08:00
Klemens Morgenstern
5e55b558e0 Set version to 345. 2022-12-07 13:52:54 +08:00
Dirk Stolle
af46c89068 Fix typo in bind_handler.hpp
Closes #2563.
2022-12-07 13:43:16 +08:00
Mojca Miklavec
b49d4e5d9c Avoid warnings about unused variable 2022-12-07 13:41:42 +08:00
Klemens Morgenstern
b986b3b1b0 Set version to 344. 2022-11-01 14:48:21 +08:00
Christopher Kohlhoff
19f91bcb32 Tests adopting asio code changes for asio 1.25.0. 2022-11-01 14:45:54 +08:00
Klemens Morgenstern
62e1b0e2fe Set version to 343. 2022-10-30 00:13:54 +08:00
Klemens Morgenstern
1fc340713c beast support default completion & rebind.
buffers_generator uses default_completion.
websocket::stream has a rebinding constructor.
ssl_stream has a rebind_executor member.
basic_stream has rebinding constructor.
2022-10-30 00:13:54 +08:00
Klemens Morgenstern
d3b82a2fb0 Set version to 342. 2022-10-27 22:56:19 +08:00
Klemens
3ebff60b1a beast support per-op cancellation
- websocket supports cancellation.
 - Iterating test for ws cancellation.
 - Only terminal cancellation is forwarded by default.
 - basic_stream supports cancellation.
 - supported cancellation is documented.
 - http cancellation additions.
 - Added cancellation_slot tests to http, utils and saved_handler.
 - Added post to write.cpp, to avoid SIGSEV in test.
 - Refresher describes cancellation in more detail.
2022-10-27 22:56:19 +08:00
Klemens Morgenstern
f4d1936bb2 error_codes use source_location. 2022-10-26 00:06:01 +08:00
Klemens Morgenstern
32b56cb0b2 Set version to 341. 2022-10-14 17:20:15 +08:00
Klemens
2820d256e8 Buffers have a feature table.
Closes #891
2022-10-14 17:20:15 +08:00
Klemens
3869d472ec buffer_adaptors uses the correct begin function. 2022-10-14 17:20:15 +08:00
Klemens
9d680df683 buffer_ref allows using beast buffers with asio. 2022-10-14 17:20:15 +08:00
Klemens Morgenstern
73922b72f9 Set version to 340. 2022-10-13 09:26:08 +08:00
Klemens Morgenstern
b0c49748a2 Support expect continue in upgrade.
Closes #264.
2022-10-13 09:26:08 +08:00
Klemens Morgenstern
b30e4fbbda test-handlers use source location 2022-10-13 09:26:08 +08:00
Klemens Morgenstern
1a02413638 unquote takes s by reference.
Closes #471.
2022-10-12 09:53:42 +08:00
Klemens Morgenstern
8f74e0d464 Field function state they're case-insensitive.
Closes #516.
2022-10-12 01:42:20 +08:00
Klemens Morgenstern
f10c0aae21 api version is documented in the docs
Closes #298
2022-10-11 23:37:26 +08:00
Klemens
01dd53d665 Empty header values are allowed & documented. 2022-10-10 14:39:46 +08:00
Klemens
541a6bf453 base64::decode initializes local variables.
Closes #2282
2022-10-05 10:04:05 +08:00
sehe
7300ef463b Removed BOOST_BEAST_USE_STD_STRING_VIEW (#2451)
Fixes #2363
2022-10-03 13:29:21 +08:00
alandefreitas
bd69638e9d per-message compression options
fix #226, #227
2022-10-03 09:25:31 +08:00
alandefreitas
fbcc16301d Fix API reference 2022-10-02 22:34:36 +08:00
alandefreitas
5ccb33b71c Websocket timeout option APIs
fix #2449
2022-10-02 20:05:56 +08:00
alandefreitas
5866e50438 Add multiple content length error
fix #2468
2022-10-02 20:04:46 +08:00
Richard Hodges
3ae7e3023f Set version to 336
closes #2513
2022-09-01 17:41:45 +02:00
Richard Hodges
d86a61f458 Remove incorrect ASSERT in websocket read
fix #2264
2022-09-01 15:46:12 +02:00
Richard Hodges
af79b4d0fd Set version to 335
close #2508
2022-08-24 22:44:07 +02:00