900 Commits

Author SHA1 Message Date
Mike Ellery e681f9d212 Add default dtors to satisfy -Wnon-virtual-dtor
close #1664
2019-08-29 10:52:07 -07:00
Vinnie Falco 9f77867f0a Fix outgoing websocket message compression
fix #1666
2019-07-29 10:35:41 -07:00
Damian Jarek 373642886a Workaround for miscompilation in MSVC 14.2
`insert()` erroneously produces the string "12__343" in
Release mode on MSVC 14.2.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:37:42 +02:00
Damian Jarek 2c2ac8027c Fix unused variable warnings in tests
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:28:58 +02:00
Damian Jarek 63ef7f65bc Handle overflow in max size calculation in basic_dynamic_body
fix #1581

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:28:49 +02:00
Vinnie Falco 67452b23ff Update documentation 2019-07-07 12:29:56 -07:00
Damian Jarek 5f0939e771 Simplify websocket::detail::prng:
- Use a regular function pointer for dynamic dispatch.
- Remove `prng::ref` - it did not benefit the default case
  (TLS avaialable) and actually made the no-TLS case slower, because
  the time spent in the generator is dominated by mutex locking.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-01 12:49:01 -07:00
Damian Jarek a5a28c3b7d Fix UB in websocket read tests
An object returned from a function is not guaranteed not to be copied
in C++14 or earlier, using `initializer_list` removes the reliance on
RVO to work.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-25 20:00:33 +02:00
Damian Jarek 7e8af58307 Move detail::base64 helpers to tests
These functions were only used in tests.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-24 11:07:41 -07:00
Damian Jarek b8b04f8f39 Cleanup transitive includes in beast/core/detail/type_traits.hpp
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-24 11:07:41 -07:00
Damian Jarek 8d5bd286d7 Replace uses of net::spawn with asio::spawn
`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>
2019-06-19 17:53:35 +02:00
Damian Jarek d5f5f1467f Enable split compilation in http::basic_fields
Moved functions,that are independent of template argument, into
an *.ipp file.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:33 +02:00
Damian Jarek 833243d948 Remove the use of static_string from http::fields
The `temporary_buffer<A>` class template replaces the use of
`static_string` in `http::fields`, simplifying `set_chunked_impl` and
`set_keep_alive_impl`.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-04 15:31:18 +02:00
Damian Jarek fce080f1a8 Add VS 2019 AzP CI matrix item
The VS 2019 image now includes vcpkg by default, which enables adding
it to CI.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-31 20:11:38 +02:00
Damian Jarek a094e7d891 Remove redundant use of yield_to in parser tests
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-31 02:04:36 +02:00
Vinnie Falco e9781b225e Fix flat_buffer copy members
fix #1621
2019-05-29 21:14:14 +02:00
Damian Jarek 2eedbfedfc Add b2 features for compile-time options used in testing:
- `boost.beast.allow-deprecated=on` disables deprecated features.
- `boost.beast.separate-compilation=on` enables separate compilation.
- Add CI matrix items to check header-only, no-deprecated build.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-27 20:18:20 +02:00
Damian Jarek 85adb6ca2f Fix buffers_cat iterator tests
The default constructed iterators tests were never run.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-20 15:34:20 +02:00
Damian Jarek 9909fada29 allocator_traits::construct is used for user-defined types:
It should only be called when constructing a user-provided type.

Close #1332

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-20 15:29:21 +02:00
Damian Jarek 86176786c3 Expand CI matrix using Azure Pipelines:
* Allow setting a seed in websocket prng to workaround a valgrind bug
  in Xenial.
* Coverage collection in Azp.
* Fixup blacklists to avoid zlib bugs.
* Use native b2 features for sanitizers and valgrind.
* Expanded Windows build matrix.
* Add additional clang (with libc++) builds.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-19 22:32:44 +02:00
Damian Jarek cefb744794 Remove uses of deprecated methods in websocket tests
This enables tests to be built without BOOST_BEAST_ALLOW_DEPRECATED.

Close #1612

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-19 22:32:43 +02:00
Damian Jarek c254b4fcfb Remove uses of the deprecated buffers function
Fix: 1607
Close: 1608

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-19 22:32:37 +02:00
Vinnie Falco 6be11913a0 Add idle ping suspend test
close #1599
2019-05-04 18:47:37 -07:00
Damian Jarek 16631de5d9 Fix UB in websocket close tests
Extend the lifetime of buffers in tests to avoid use-after-free.

Resolves: #1593

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-04 17:29:43 +02:00
Damian Jarek 45aaf22acd Relax requirements for vector_body:
fix: #1567

std::byte is not an arithmetic type, which caused compilation to fail
when it was used in vector_body.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-04-20 10:19:31 -07:00
Vinnie Falco e53ccf251c Fix min/max on MSVC
fix #1578
2019-04-19 11:36:00 -07:00
Vinnie Falco 0a334d96d1 member get_executor const-correctness
fix #1559
2019-04-19 11:18:55 -07:00
Vinnie Falco 71de05d3cc More std::string_view fixes 2019-04-18 16:15:42 -07:00
Damian Jarek ce986118f8 Fix async_base immediate completion
`complete(false, ...)` used the wrong executor when an async operation
completed immediately, potentially executing the completion handler on
the IO executor in some cases.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-04-05 05:08:31 -07:00
Vinnie Falco 7c084509d6 decorator constructor is constrained 2019-04-02 16:49:05 -07:00
Vinnie Falco 4f464ccaeb Tidy up file_stdio for VS2015 2019-03-30 14:14:59 -07:00
Vinnie Falco 4e90183bda Check defined(BOOST_MSVC) 2019-03-29 20:42:44 -07:00
Vinnie Falco 18bf9b4037 Tidy up a doc code snippet 2019-03-28 09:53:27 -07:00
Damian Jarek 5a0b4d7ebe More split compilation in HTTP
close #1541

- Remove unused private functions: `skip_ows_rev`, `skip_obs_fold`.
- Enable split compilation in `http/detail/rfc7230.hpp`.
- More split compilation in `basic_parser`.
- Remove some unnecessary includes.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-24 11:05:24 -07:00
Vinnie Falco 61fcd9ef6f Refactor Jamfiles to work with release layout 2019-03-24 09:18:02 -07:00
Vinnie Falco b38901887b cmake: Use static libs to speed up builds 2019-03-23 17:50:38 -07:00
Damian Jarek 222dcf7b18 Jamfile cleanup:
- Don't set the global link settings (`<link>`) to avoid dependency
ordering issues in the future.
- Allow the user to decide on the link settings for dependencies
(filesystem/coroutine).
- Make dependencies in examples explicit.
- Remove dependency of examples on Boost.Filesystem (was not used there).
- Deduplicate build settings.
- Speed up test compilation by avoiding rebuilding of main test file.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-21 17:23:49 +01:00
Vinnie Falco 1f560692ac Fix self-assignment warning in buffer test 2019-03-21 17:23:49 +01:00
Damian Jarek 05f3f8a5ce Remove the need for OpenSSL in examples that don't use it
close #1524

It is now possible to compile examples without OpenSSL. Examples that
do require OpenSSL will be omitted.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-19 06:59:55 -07:00
Damian Jarek 8869ec5681 Use secure TLS/SSL versions:
TLS1.2 can be used instead, it is available in all currently
supported versions of OpenSSL.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-14 09:56:50 -07:00
Vinnie Falco fdf64a4550 Remove dynamic_buffer_ref:
* 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.
2019-03-07 12:56:40 -08:00
Vinnie Falco 4ad9d4a0ba Doc tidying 2019-03-07 12:56:40 -08:00
Vinnie Falco 43fcbd7f24 Remove deprecated handler_ptr tests 2019-03-07 12:56:34 -08:00
Vinnie Falco 06a42f2202 Fix stable_async_base example 2019-03-06 10:38:08 -08:00
Vinnie Falco 45353a7f04 handler_ptr is deprecated (API Change):
* `handler_ptr` is deprecated and should not be used.

Actions Required:

* Replace use of `handler_ptr` with `stable_async_base`
  and `allocate_stable`.
2019-03-06 10:38:08 -08:00
Vinnie Falco e073a9e7fc Tidy up docs 2019-03-05 20:15:07 -08:00
Vinnie Falco 9f2b0ce1db Rename to buffer_bytes 2019-03-05 11:09:53 -08:00
Vinnie Falco 6ccdcdf51d buffer_size is in buffer_traits.hpp 2019-03-05 11:09:50 -08:00
Vinnie Falco 8e2620e2b1 Doc tidy 2019-03-05 08:00:14 -08:00
Vinnie Falco e4342b51b2 SSL teardowns are in an associated namespace 2019-03-04 18:33:24 -08:00