API Changes:
`string_param`, which was previously the argument type when setting field values
has been replaced by `string_view`. Because of this, it is no longer possible to
set message field values directly as integrals.
Users are required to convert numeric arguments to a string type prior to calling
`fields::set` et. al.
Beast provides the non-allocating `to_static_string()` function for this purpose.
To set Content-Length field manually, call `message::content_length`.
fixes#1956
API Changes:
The file `core/buffers_adapter.hpp` has been removed along with the deprecated
alias typename `buffers_adapter`. Affected programs should use
`core/buffers_adapator.hpp` and the type `buffers_adaptor`.
refs #1934
API Changes:
The error code enum `invalid_code_lenths` was a synonym of `invalid_code_lengths`.
Affected programs should be modified to use `invalid_code_lengths`.
refs #1934
API Changes:
The core/type_traits.hpp public header has been removed and along with it
the type trait is_completion_handler. Beast uses the CompletionHandler correctness
checks provided by Asio. In a c++20 environment, these convert to concept checks.
API Changes:
* Code that depends on mutable_data_type should be refactored to use
mutable_buffers_type. Classes affected are:
- buffers_adaptor
- flat_buffer
- flat_static_buffer
- multi_buffer
- static_buffer
refs #1934
API Changes:
* The following deprecated functions have been removed:
- websocket::async_accept_ex
- websocket::async_handshake_ex
- websocket::accept_ex
- websocket::handshake_ex
Programs still using these names should be refactored to use the `decorator` feature and
the remaining handshake and accept functions.
refs #1934
API Changes:
The macro BOOST_BEAST_NO_DEPRECATED will no longer be noticed by Beast. The only way to
enable deprecated functionality is now the macro BOOST_BEAST_ALLOW_DEPRECATED which is
undefined by default. That is, all deprecated behaviour is disabled by default.
refs #1934
API Changes:
The signature of basic_parser<>::body_limit(n) has changed. It now accepts an
optional std::uint64_t. The caller may indicate that no body limit is required
by calling body_limit(boost::none). The default limits remain in place in order
to maintain 'safe by default' behaviour.
closes#1897closes#1965
API Changes:
basic_stream::expires_after used to take a nanosecond duration type argument. This
required users on systems where the steady_clock::duration_type was less accurate
to explicity duration_cast when calling this function, making code non-portable.
The duration type is now that of the embedded steady_clock.
Many thanks to @spdw for noticing this and providing a patch.
fixes#1943closes#1960
fix#1853, close#1859, close#1866
After calling the DynamicBuffer commit() function the
buffer returned from prepare() can be invalidated but
the ostream kept using it.