fix#2417
This improves inter-conversion between string_view implementations. Some observable differences for users:
- core::string_view no longer supports the .to_string() or .clear() extensions from Utility
- code that relied on .max_size() returning .size(), needs to be fixed to .size() instead
- remove_suffix() and remove_prefix() were more lenient than the standard specs; be sure you don't rely on it clamping the argument to valid range
- BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS no longer suppresses conversions to std::string
- core::string_view adds .contains() and various bugs fixed
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
`asio::spawn` is an extension, which is not part of
the Networking TS, so the `net` alias is not appropriate in this case.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
fix#1375
* The value returned from `basic_parser::content_length`
no longer changes as the body of the message is received.
Actions Required:
* Call `basic_parser::content_length_remaining` instead
of `basic_parser::content_length`.
* dynamic_buffer_ref is removed, because Asio / Networking
has introduced the DynamicBuffer_v2 concept which is incompatible
with Beast's storage types.
The next version of Beast (1.70) will provide changes to
interoperate with Asio / Networking's new concepts.