2 Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 Official repository: https://github.com/boostorg/beast
10 [section Release Notes]
12 [/-----------------------------------------------------------------------------]
18 * Add async-ssl-system-executor http client example
20 * Add async-ssl-system-executor websocket client example
24 * Async init-fns use the executor's default token
26 * Use automatically deduced return types for all async operations (since C++14)
28 * Support Concepts for completion token params
32 * [issue 1664] Add default dtors to satisfy -Wnon-virtual-dtor
34 * [issue 1682] Multiple I/O of the same type is not supported
36 * [issue 1687] Fix signed/unsigned mismatch in file_stdio::seek
38 * [issue 1688] basic_stream dtor cannot throw
40 * [issue 1734] Fix leftovers in basic_parser corner case:
42 * [issue 1751] https_get example sends the Host header
44 * [issue 1754] Fix async_close error code when async_read times out
46 * [issue 1782] root_certificates.hpp is not for production
48 * Fix data race in websocket examples
50 * Fix data race in http server examples
52 * Squelch spurious websocket timer assert
54 * Use the executor type in basic_stream timer
56 [/-----------------------------------------------------------------------------]
64 * [issue 1280] Add 1-element specialization for `buffers_cat`
66 * [issue 1556] Set parser status and flags even if body limit has been reached
68 * [issue 1567] Relax requirements for vector_body
70 * [issue 1568] `detect_ssl` uses `bool` instead of `tribool`
72 * [issue 1574] Replace `static_string` in HTTP parser
74 * [issue 1606] Use `steady_timer` type
76 * [issue 1611] Make chat websocket javascript client more user friendly
78 * [issue 1613] Remove redundant use of `static_string`
80 * [issue 1636] Improve performance of `http::string_to_verb`
82 * Preserve `operation_aborted` on partial message
84 * Remove unused `<experimental/unit_test/thread.hpp>`
86 * Reduce the number of instantiations of `filter_token_list`
88 * Add idle ping suspend test
90 * Remove the use of `bind_executor` in `basic_stream`
92 * Remove redundant template in service_base
94 * Remove the use of `static_string` from `http::fields`
96 * Enable split compilation in http::basic_fields
98 * Remove redundant instation of `static_string` in websocket
100 * Remove redundant use of `asio::coroutine` in `flat_stream`
102 * More split compilation in rfc7230.hpp
104 * More split compilation in websocket/detail/mask.hpp
106 * Simplify generation of sec-websocket-key
113 * [issue 1332] `allocator_traits::construct` is used for user-defined types
115 * [issue 1559] Member `get_executor` const-correctness
117 * [issue 1569] Fix `async_detect_ssl` handler type
119 * [issue 1570] Launder pointers
121 * [issue 1578] Fix min/max on MSVC
123 * [issue 1586] Fix uninitalized memory use in deflate_stream
125 * [issue 1593] Fix UB in websocket close tests
127 * [issue 1594] Fix data race in test stream
129 * [issue 1599] Fix moved-from executor in idle ping timeout
131 * [issue 1607] Remove uses of the deprecated `buffers` function
133 * [issue 1612] Remove uses of deprecated methods in websocket tests
135 * [issue 1620] Clean up typo in chat websocket javascript client
137 * [issue 1621] Fix `flat_buffer` copy members
139 * Silence gcc-8 warning
141 * Fix `buffers_cat` iterator tests
143 * Don't pessimize-move
145 * Qualify calls to `beast::iequals` in basic_parser.ipp
147 * Fix UB in websocket read tests
149 * Simplify websocket::detail::prng
151 * Don't over-allocate in http::basic_fields
157 * Documentation is built with SaxonHE instead of xsltproc
161 [/-----------------------------------------------------------------------------]
166 The namespace alias `net` is used throughout for `boost::asio`.
171 * All composed operations use the new
172 [@boost:/doc/html/boost_asio/reference/async_initiate.html `net::async_initiate`]
175 * New `tcp_stream` and
179 [link beast.ref.boost__beast__basic_stream.async_read_some `async_read_some`],
180 [link beast.ref.boost__beast__basic_stream.async_write_some `async_write_some`]
182 [link beast.ref.boost__beast__error `error::timeout`]
184 * Traffic-shaping policies
185 [link beast.ref.boost__beast__simple_rate_policy `simple`] and
186 [link beast.ref.boost__beast__unlimited_rate_policy `unlimited`],
188 [link beast.concepts.RatePolicy ['RatePolicy]].
190 [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1322r0.html P1322R0].
192 * `websocket::stream`
194 * Configurable handshake timeout
195 * Configurable idle timeout
196 * Automatic idle pings
198 * [link beast.ref.boost__beast__ssl_stream `ssl_stream`]
199 is a public interface
201 * ([issue 1305]) Better
203 `flat_static_buffer`,
206 * Revise all reference documentation
207 * Move construction does not always invalidate buffers
208 * non-const `data()` returns a mutable buffer sequence
209 * Add `cdata()` to also return constant readable bytes
210 * Eligible member functions are declared `noexcept`
212 * ([issue 1345]) Better
215 * Add `clear`, `reserve()`, `max_size()`, `shrink_to_fit()`
216 * Respect Allocator `max_size()`
217 * Specify exception safety
219 * ([issue 1384]) New functions
226 * More members are `noexcept`
227 * Specify exception safety
230 `http::string_to_field`
232 * Dynamic buffer `clear` operations perserve capacity.
234 * New file <boost/beast/core/buffer_traits.hpp>
235 * New variadic `is_const_buffer_sequence`
236 * New variadic `is_mutable_buffer_sequence`
237 * New trait `buffers_iterator_type`
238 * New trait `buffers_type`
243 * Handle boilerplate for writing composed operations
246 is preferred over `handler_ptr`
250 replacement for `net::buffer_size`
254 * `buffers_range_ref`
256 * `get_lowest_layer`,
263 * These interfaces are now public (were experimental):
264 [link beast.ref.boost__beast__flat_stream `flat_stream`],
265 [link beast.ref.boost__beast__detect_ssl `detect_ssl`],
266 [link beast.ref.boost__beast__async_detect_ssl `async_detect_ssl`].
268 * Websocket streams use PCG as the fast random number generator,
269 for increased security.
275 * WebSocket reference documentation is revised
277 * Updated [link beast.using_io.asio_refresher Networking Refresher]
279 * Revised [link beast.using_io.writing_composed_operations.echo Asynchronous Echo]
281 * Rewritten [link beast.using_io.writing_composed_operations.detect_ssl [*Detect SSL Handshake]]
287 * The __Fields__ concept is deprecated and will be removed
288 in a future version. ['Actions Required]: Do not rely on
289 the ['Fields] concept.
291 * `handler_ptr` is deprecated. ['Actions Required]: Use
292 `stable_async_base` and
296 * On Windows, Visual Studio 2017 or later is required
298 * OpenSSL is required to build the examples and tests
300 * HTTP stream algorithms return the number of bytes transferred
301 from the stream. Previously, they returned the number of bytes
302 consumed by the parser.
304 * Callers depending on the return value of
307 overloads should adjust the usage of
308 the returned value as needed.
313 `is_sync_read_stream`,
314 `is_sync_write_stream`,
316 `is_async_read_stream`, and
317 `is_async_write_stream`
318 are in stream_traits.hpp.
319 ['Actions Required]: Include stream_traits.hpp as needed.
324 * Change uses of the `basic_parser` type to omit the `Derived`
326 * Classes derived from `basic_parser` no longer need to friend
328 * Virtual functions in the derived class may be marked `override`.
333 ['Actions Required]: Include file_base.hpp as needed.
335 * `flat_static_buffer::reset()`
341 * `buffers_adapter` is spelled
344 * Replace `buffers_adapter` with
346 or define `BOOST_BEAST_ALLOW_DEPRECATED`.
348 * `buffers` is spelled
351 * Replace `buffers` with
353 and include "make_printable.hpp" instead of "ostream.hpp".
355 * `file_mode::append_new` is removed, as it makes no sense.
357 - Replace `file_mode::append_new` with either
358 `file_mode::append` or
359 `file_mode::append_existing`
362 * `role_type` is moved from `websocket` to `beast`
364 * `buffers_range_ref`
365 is preferred to `std::reference_wrapper`.
369 with the buffer, instead of calling
371 with a reference wrapper constructed from the buffer.
373 * Nested `lowest_layer` and `lowest_layer_type` are removed.
374 ['Actions Required]: Use the free function
375 `get_lowest_layer` and the
377 `lowest_layer_type` instead.
379 * WebSocket decorator is a socket option:
380 * Overloads of the following functions which accept a Decorator
382 - `accept`, `accept_ex`
383 - `handshake`, `handshake_ex`
384 - `async_accept`, `async_accept_ex`
385 - `async_handshake`, `async_handshake_ex`
387 * ([issue 1375]) The value returned from `basic_parser::content_length`
388 no longer changes as the body of the message is received.
389 ['Actions Required]: Call `basic_parser::content_length_remaining` instead
390 of `basic_parser::content_length` in order to determine the remaining
391 number of bytes in the body.
396 * All example programs are updated:
402 * Set timeouts for WebSocket streams.
406 * ([issue 1100]) http-crawl clears the response before each read
408 * ([issue 1347]) echo-op is rewritten
410 * ([issue 1401]) Examples use
413 * Advanced servers use HTTP parser interfaces for reading
415 * detect-ssl is rewritten
417 * New example [path_link example/websocket/server/chat-multi example/websocket/server/chat-multi]
419 * `async_echo` works with move-only handlers
421 * cppcon2018 example is removed
427 * ([issue 38]) Better treatment of SSL short reads
429 * ([issue 1223]) HTTP read counts bytes correctly when an error occurs
431 * ([issue 1247]) Update `ssl_stream`
434 * ([issue 1279]) Enable explicit instantiations of
437 * ([issue 1290]) Don't use deprecated Asio interfaces
439 * ([issue 1306]) `http::message`
440 is not-a `boost::empty_value`
442 * ([issue 1306]) `test::stream`
443 has fewer dependencies
445 * ([issue 1358]) Destroy abandoned websocket ops on shutdown
447 * ([issue 1365]) Handler wrappers decay parameters sooner
449 * ([issue 1408]) `session_alloc`
452 * ([issue 1414]) Boost.System is header-only
454 * ([issue 1418]) `test::stream`
455 maintains a handler work guard
457 * ([issue 1445]) Fix posix_file::close handling of EINTR
459 * ([issue 1460]) Large WebSocket Upgrade response no longer overflows
461 * Reusing an HTTP parser returns an error
463 * Handler bind wrappers use the associated allocator
466 correctly skips empty buffers when iterated
469 does not overflow or exceed the dynamic buffer's maximum size
472 `test::stream::async_read`
474 * `file_mode::append_existing`
477 * A handler work guard is maintained on paused websocket operations
479 * All behavior of default-constructed iterators is conforming
481 [/-----------------------------------------------------------------------------]
490 <videodata fileref="https://www.youtube.com/embed/7FQwAjELMek"
491 align="center" contentwidth="448" contentdepth="252"/>
498 * ([issue 1133]) Add `BOOST_BEAST_USE_STD_STRING_VIEW`
502 * New WebSocket server and browser-based client: example/cppcon2018
506 * ([issue 1245]) Fix a rare case of incorrect UTF8 validation
508 * ([issue 1237]) Verify certificates in client examples
510 * ([issue 1233]) Use [@boost:/doc/html/core/empty_value.html `boost::empty_value`]
512 * ([issue 1091]) Fix timer on websocket upgrade in examples
514 * ([issue 1270]) [link beast.ref.boost__beast__http__basic_fields `basic_fields`] uses intrusive base hooks
516 * ([issue 1267]) Fix parsing of out-of-bounds hex values
518 * ([issue 1263]) Fix uninitialized comparison in buffers iterator
520 * ([issue 1288]) Remove extraneous strand from example
522 * Workaround for http-server-fast and libstdc++
524 * Partial support for `BOOST_NO_EXCEPTIONS`
528 * Add `timeout_socket`
535 This version fixes a missing executor work guard in all composed operations
536 used in the implementation. Users who are experiencing crashes related to
537 asynchronous completion handlers are encouraged to upgrade. Also included
538 is an improved mechanism for generating random numbers used to mask outgoing
539 websocket frames when operating in the client mode. This resolves a
540 vulnerability described in the Beast Hybrid Assessment Report from Bishop Fox.
544 The include directory `<beast/experimental>` contains features which are not
545 part of the stable public interface but are available anyway. They may change
548 * ([issue 1108]) New [link beast.ref.boost__beast__flat_stream `flat_stream`] for working around an SSL stream performance limitation
550 * ([issue 1151], [issue 595]) New [link beast.ref.boost__beast__http__icy_stream `http::icy_stream`] stream filter allows parsing ICY HTTP response handshakes
552 * New [link beast.ref.boost__beast__ssl_stream `ssl_stream`] for better SSL performance and move constructability
555 [link beast.ref.boost__beast__test__error `test::connect`],
556 [link beast.ref.boost__beast__test__error `test::error`],
557 [link beast.ref.boost__beast__test__error `test::fail_count`], and
558 [link beast.ref.boost__beast__test__error `test::stream`] utilities for writing unit tests.
560 * New [link beast.ref.boost__beast__http__is_mutable_body_writer `http::is_mutable_body_writer`] metafunction
562 * New [link beast.ref.boost__beast__websocket__seed_prng `websocket::seed_prng`] for manually providing entropy to the PRNG
564 * New [link beast.ref.boost__beast__websocket__stream.secure_prng `websocket::stream::secure_prng`] to control whether the connection uses a secure PRNG
568 * Generated WebSocket masks use a secure PRNG by default
570 * Improvements to [link beast.ref.boost__beast__buffers_adaptor `buffers_adaptor`]
572 * ([issue 1188]) Set "/permissive-" for MSVC builds
574 * ([issue 1109]) Use a shared string for example HTTP server doc roots
576 * ([issue 1079]) Add `handler_ptr::has_value`
580 * ([issue 1073]) Fix race in advanced server examples
582 * ([issue 1076]) Use executor_work_guard in composed operations
584 * ([issue 1079]) Remove spurious assert
586 * ([issue 1113]) Add `const` and non-`const` overloads for message based HTTP writes
588 * ([issue 1119]) Fix unused variable warning
590 * ([issue 1121]) Examples use the root certificate which matches the fingerprint
592 * ([issue 1141]) Tidy up composed operation doc
594 * ([issue 1186]) Check error in example set_option
596 * ([issue 1210]) Fix http_server_stackless_ssl.cpp example
598 * ([issue 1211]) Fix parse_dec algorithm
600 * ([issue 1214]) Silence ubsan false positive
602 * Tidy up websocket stream javadocs
604 * Fix move-only arguments in [link beast.ref.boost__beast__bind_handler `bind_handler`]
606 * Fix [link beast.ref.boost__beast__http__parser `http::parser`] constructor javadoc
608 * Fix [link beast.ref.boost__beast__buffers_adaptor `buffers_adaptor`] iterator value type
610 * Fix [link beast.ref.boost__beast__buffers_adaptor.max_size `buffers_adaptor::max_size`]
612 * Fix [link beast.ref.boost__beast__buffers_prefix `buffers_prefix`] iterator decrement
614 * Fix __Fields__, __FieldsWriter__ concept docs
616 * Fix __BodyReader__ constructor requirements doc
620 * Remove deprecated `serializer::reader_impl`
622 * Remove deprecated __Body__ `reader` and `writer` ctor signatures
630 This version fixes significant defects in
631 [link beast.ref.boost__beast__websocket__stream `websocket::stream`]
632 which can lead to asserts or undefined behavior. Users are encouraged
633 to update to the latest Boost release.
637 * Move-only completion handlers are supported throughout the library
639 * ([issue 899]) Advanced server examples support idle websocket pings and timeouts
641 * ([issue 849]) WebSocket permessage-deflate support is now a compile-time
642 feature. This adds an additional `bool` template parameter to
643 [link beast.ref.boost__beast__websocket__stream `websocket::stream`]
644 When `deflateSupported` is `true`, the stream will be capable of
645 negotiating the permessage-deflate websocket extension per the
646 configured run-time settings.
647 When `deflateSupported` is `false`, the stream will never negotiate
648 the permessage-deflate websocket extension. Furthermore, all of the
649 code necessary for implementing the permessage-deflate extension
650 will be excluded from function instantiations. Programs which set
651 `deflateSupported` to `false` when instantiating streams will be smaller.
653 * ([issue 949]) WebSocket error codes are revised. New
654 [link beast.ref.boost__beast__websocket__error error codes]
655 are added for more fine-grained failure outcomes. Messages for error
656 codes are more verbose to help pinpoint the problem. Error codes are
657 now also mapped to newly added
658 [link beast.ref.boost__beast__websocket__condition error conditions]
659 to simplify comparisons. The error codes `websocket::error::failed`
660 and `websocket::error::handshake_failed` are removed.
662 Code which explicitly compares `error_code` values against
663 the constant `websocket::error::handshake_failed` should compare
665 [link beast.ref.boost__beast__websocket__condition `websocket::condition::handshake_failed`]
667 Code which explicitly compares error_code values against the
668 constant `websocket::error::failed` should compare
670 [link beast.ref.boost__beast__websocket__condition `websocket::condition::protocol_violation`]
676 [link beast.ref.boost__beast__http__basic_fields `http::basic_fields`]
680 [link beast.ref.boost__beast__http__basic_fields `http::basic_fields`]
681 exception specifiers are provided
683 * Implementation no longer uses deprecated `asio::null_buffers`
685 * Add [include_file boost/beast/websocket/stream_fwd.hpp]
687 * ([issue 955]) The asynchronous SSL detector example uses a stackless coroutine
689 * [link beast.ref.boost__beast__bind_handler `bind_handler`]
690 works with boost placeholders
692 * Examples set `reuse_address(true)`
694 * ([issue 1026]) Advanced servers support clean shutdown via SIGINT or SIGTERM
696 * Some basic_fields operations now give the strong exception guarantee
700 * Fix "warning: ‘const’ type qualifier on return type has no effect"
702 * ([issue 916]) Tidy up `ssl_stream` special members
704 * ([issue 918]) Calls to `<algorithm>` are protected from macros
706 * ([issue 954]) The control callback is invoked on the proper executor
708 * ([issue 994]) Fix iterator version of
709 [link beast.ref.boost__beast__http__basic_fields.erase.overload1 `http::basic_fields::erase`]
711 * ([issue 992]) Fix use-after-move in example request handlers
713 * ([issue 988]) Type check completion handlers
715 * ([issue 985]) Tidy up
716 [link beast.ref.boost__beast__bind_handler `bind_handler`]
719 * Fix memory leak in advanced server examples
721 * ([issue 1000]) Fix soft-mutex assert in websocket stream.
722 This resolves the assert `"ws_.wr_block_ == tok_"`.
724 * ([issue 1019]) Fix fallthrough warnings
726 * ([issue 1024]) Fix teardown for TIME_WAIT
728 * ([issue 1030]) Fix big-endian websocket masking
730 * Safe treatment of zero-length string arguments in basic_fields
732 * ([issue 1043]) Examples clear the HTTP message before reading
734 * ([issue 1012]) Add asio_handler_invoke overloads for stream algorithms
736 * Add Access-Control-Expose-Headers field constant
740 * Remove unintended public members of
742 Actions required: don't call non-public members.
745 is a move-only type, with `unique_ptr` semantics.
746 Actions required: user-defined composed operations using `handler_ptr`
747 to manage state can only be moved, not copied.
750 gives the strong exception guarantee. The constructor signature
751 for managed objects constructed by `handler_ptr` now receives a
752 `const` reference to the handler. Actions required: Change the
753 constructor signature for state objects used with `handler_ptr`
754 to receive a `const` reference to the handler.
757 [link beast.ref.boost__beast__http__basic_fields `http::basic_fields`]
758 does not support fancy pointers
760 * [link beast.ref.boost__beast__http__parser `http::parser`]
761 is no longer [*MoveConstructible]
763 * ([issue 930]) `http::serializer::reader_impl` is deprecated and will
764 be removed in the next release. Actions required: Call
765 [link beast.ref.boost__beast__http__serializer.writer_impl `http::serializer::writer_impl`]
766 instead of `serializer::reader_impl`.
768 * ([issue 884]) The __BodyReader__ and __BodyWriter__ concept constructor
769 requirements have changed. They now require the header and body
770 elements to be passed as distinct
771 [link beast.ref.boost__beast__http__header `http::header`]
772 and `value_type` objects. This enables the composition of body types.
773 The previous single-argument constructors are deprecated and will be
774 removed in the next version.
775 Actions required: Change user-defined instances of __BodyReader__ or
776 __BodyWriter__ constructor signatures to the two-argument form.
777 Alternatively. define the macro `BOOST_BEAST_ALLOW_DEPRECATED` in
778 the project (which will cause both the new and the deprecated
779 signatures to be accepted).
781 * [link beast.ref.boost__beast__websocket__stream.control_callback `websocket::stream::control_callback`]
782 now copies or moves the function object.
784 * ([issue 1014]) DynamicBuffer input areas are not mutable.
785 Actions required: do not attempt to write to input areas of dynamic
788 * ([issue 941]) `get_lowest_layer` is now a type alias.
789 Actions required: Replace instances of `typename get_lowest_layer<T>::type`
790 with `get_lowest_layer<T>`.