Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Release Notes
PrevUpHomeNext

This version fixes a missing executor work guard in all composed operations used in the implementation. Users who are experiencing crashes related to asynchronous completion handlers are encouraged to upgrade. Also included is an improved mechanism for generating random numbers used to mask outgoing websocket frames when operating in the client mode. This resolves a vulnerability described in the Beast Hybrid Assessment Report from Bishop Fox.

Boost 1.68

New Features

The include directory <beast/experimental> contains features which are not part of the stable public interface but are available anyway. They may change in future versions.

Improvements

Fixes

  • ( #1073) Fix race in advanced server examples
  • ( #1076) Use executor_work_guard in composed operations
  • ( #1079) Remove spurious assert
  • ( #1113) Add const and non-const overloads for message based HTTP writes
  • ( #1119) Fix unused variable warning
  • ( #1121) Examples use the root certificate which matches the fingerprint
  • ( #1141) Tidy up composed operation doc
  • ( #1186) Check error in example set_option
  • ( #1210) Fix http_server_stackless_ssl.cpp example
  • ( #1211) Fix parse_dec algorithm
  • Tidy up websocket stream javadocs
  • Fix move-only arguments in bind_handler
  • Fix http::parser constructor javadoc
  • Fix buffers_adapter iterator value type
  • Fix buffers_adapter::max_size
  • Fix buffers_prefix iterator decrement
  • Fix Fields, FieldsWriter concept docs
  • Fix BodyReader constructor requirements doc

Breaking Changes

  • Remove deprecated serializer::reader_impl
  • Remove deprecated Body reader and writer ctor signatures

Boost 1.67

This version fixes significant defects in websocket::stream which can lead to asserts or undefined behavior. Users are encouraged to update to the latest Boost release.

New Features

  • Move-only completion handlers are supported throughout the library
  • ( #899) Advanced server examples support idle websocket pings and timeouts
  • ( #849) WebSocket permessage-deflate support is now a compile-time feature. This adds an additional bool template parameter to websocket::stream When deflateSupported is true, the stream will be capable of negotiating the permessage-deflate websocket extension per the configured run-time settings. When deflateSupported is false, the stream will never negotiate the permessage-deflate websocket extension. Furthermore, all of the code necessary for implementing the permessage-deflate extension will be excluded from function instantiations. Programs which set deflateSupported to false when instantiating streams will be smaller.
  • ( #949) WebSocket error codes are revised. New error codes are added for more fine-grained failure outcomes. Messages for error codes are more verbose to help pinpoint the problem. Error codes are now also mapped to newly added error conditions to simplify comparisons. The error codes websocket::error::failed and websocket::error::handshake_failed are removed. Actions required: Code which explicitly compares error_code values against the constant websocket::error::handshake_failed should compare against websocket::condition::handshake_failed instead. Code which explicitly compares error_code values against the constant websocket::error::failed should compare against websocket::condition::protocol_violation instead.

Improvements

Fixes

  • Fix "warning: ‘const’ type qualifier on return type has no effect"
  • ( #916) Tidy up ssl_stream special members in example/common/ssl_stream.hpp
  • ( #918) Calls to <algorithm> are protected from macros
  • ( #954) The control callback is invoked on the proper executor
  • ( #994) Fix iterator version of http::basic_fields::erase
  • ( #992) Fix use-after-move in example request handlers
  • ( #988) Type check completion handlers
  • ( #985) Tidy up bind_handler doc
  • Fix memory leak in advanced server examples
  • ( #1000) Fix soft-mutex assert in websocket stream. This resolves the assert "ws_.wr_block_ == tok_".
  • ( #1019) Fix fallthrough warnings
  • ( #1024) Fix teardown for TIME_WAIT
  • ( #1030) Fix big-endian websocket masking
  • Safe treatment of zero-length string arguments in basic_fields
  • ( #1043) Examples clear the HTTP message before reading
  • ( #1012) Add asio_handler_invoke overloads for stream algorithms
  • Add Access-Control-Expose-Headers field constant

API Changes

  • Remove unintended public members of handler_ptr. Actions required: don't call non-public members.
  • handler_ptr is a move-only type, with unique_ptr semantics. Actions required: user-defined composed operations using handler_ptr to manage state can only be moved, not copied.
  • handler_ptr gives the strong exception guarantee. The constructor signature for managed objects constructed by handler_ptr now receives a const reference to the handler. Actions required: Change the constructor signature for state objects used with handler_ptr to receive a const reference to the handler.
  • ( #896) http::basic_fields does not support fancy pointers
  • http::parser is no longer MoveConstructible
  • ( #930) http::serializer::reader_impl is deprecated and will be removed in the next release. Actions required: Call http::serializer::writer_impl instead of serializer::reader_impl.
  • ( #884) The BodyReader and BodyWriter concept constructor requirements have changed. They now require the header and body elements to be passed as distinct http::header and value_type objects. This enables the composition of body types. The previous single-argument constructors are deprecated and will be removed in the next version. Actions required: Change user-defined instances of BodyReader or BodyWriter constructor signatures to the two-argument form. Alternatively. define the macro BOOST_BEAST_ALLOW_DEPRECATED in the project (which will cause both the new and the deprecated signatures to be accepted).
  • websocket::stream::control_callback now copies or moves the function object.
  • ( #1014) DynamicBuffer input areas are not mutable. Actions required: do not attempt to write to input areas of dynamic buffers.
  • ( #941) get_lowest_layer is now a type alias. Actions required: Replace instances of typename get_lowest_layer<T>::type with get_lowest_layer<T>.

Boost 1.66

  • Initial release

PrevUpHomeNext